make go-yaml a required dependency

This commit is contained in:
saji 2023-05-29 13:33:49 -05:00
parent 6f4e8194d5
commit f93e31e9be
4 changed files with 8 additions and 4 deletions

2
go.mod
View file

@ -11,6 +11,7 @@ require (
go.bug.st/serial v1.5.0
golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53
golang.org/x/sys v0.7.0
gopkg.in/yaml.v3 v3.0.1
)
require (
@ -20,5 +21,4 @@ require (
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/stretchr/testify v1.8.0 // indirect
github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

1
go.sum
View file

@ -69,6 +69,7 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

View file

@ -4,6 +4,11 @@ import (
"encoding/binary"
"encoding/json"
"math"
// this is needed so that we can run make_skylab.go
// without this, the yaml library will be removed
// when we run `go mod tidy`
_ "gopkg.in/yaml.v3"
)
/*
@ -90,7 +95,6 @@ type BusEvent struct {
Data Packet `json:"data"`
}
// FIXME: handle Name field.
func (e *BusEvent) MarshalJSON() (b []byte, err error) {
// create the underlying raw event
j := &jsonRawEvent{
@ -125,7 +129,6 @@ func (e *BusEvent) UnmarshalJSON(b []byte) error {
return err
}
// FIXME: handle name field.
func (e *BusEvent) MarshalMsg(b []byte) ([]byte, error) {
// we need to send the bytes as a []byte instead of

View file

@ -1,4 +1,4 @@
// generated by gen_skylab.go at 2023-05-28 19:37:49.492566781 -0500 CDT m=+0.002675778 DO NOT EDIT!
// generated by gen_skylab.go at 2023-05-29 13:32:54.641838299 -0500 CDT m=+0.002791417 DO NOT EDIT!
package skylab