diff --git a/go.mod b/go.mod index 548978b5a..6c823b306 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.14 require ( github.com/golang/protobuf v1.4.3 // indirect github.com/lucas-clemente/quic-go v0.19.2 - github.com/yomorun/yomo-codec-golang v0.4.0 + github.com/yomorun/yomo-codec-golang v1.0.0 golang.org/x/crypto v0.0.0-20201124201722-c8d3bf9c5392 // indirect golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 // indirect google.golang.org/protobuf v1.25.0 // indirect diff --git a/go.sum b/go.sum index bb0435e6f..c6f22e569 100644 --- a/go.sum +++ b/go.sum @@ -27,6 +27,7 @@ github.com/10cella/yomo-json-codec v0.2.6 h1:LjJHlYtQ9nma84/Tbo56lessv5ojHKP3nGT github.com/10cella/yomo-json-codec v0.2.6/go.mod h1:j4rl6bth7Bb6F8UC0SPN2XxlGGUsHGWO8LnrH5Q8RzI= github.com/10cella/yomo-txtkv-codec v1.0.5 h1:rVdtBcsff3RG3BEq7AHq2WvNiGDF6IEKlTiplypfX+c= github.com/10cella/yomo-txtkv-codec v1.0.5/go.mod h1:nBfcD3qVq6kkSRHOgSUxK1+gMRoXI0obLF+b1eiyCtM= +github.com/10cella/yomo-y3-stress-testing v1.0.0/go.mod h1:L31BazYe9K489eRUiNjIiUTj9xIo8jPDxRzyPxikcyw= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -170,12 +171,17 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= +github.com/ugorji/go v1.2.1/go.mod h1:cSVypSfTLm2o9fKxXvQgn3rMmkPXovcWor6Qn5tbFmI= +github.com/ugorji/go/codec v1.2.1/go.mod h1:s/WxCRi46t8rA+fowL40EnmD7ec0XhR7ZypxeBNdzsM= github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU= github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM= github.com/yomorun/yomo-codec-golang v0.1.0 h1:K0hKnpw4/SDwvsgjl17lPIdOJqsOo193XU7iIn76w+4= github.com/yomorun/yomo-codec-golang v0.1.0/go.mod h1:r/611MRnZbd31sd9wNzoDKxYy4Tnt8WHnC4iDTAW3NY= +github.com/yomorun/yomo-codec-golang v0.2.1/go.mod h1:r/611MRnZbd31sd9wNzoDKxYy4Tnt8WHnC4iDTAW3NY= github.com/yomorun/yomo-codec-golang v0.4.0 h1:/6jQ5rhY5B6Q8qCk2zJF31WUsBkFsLHOF5dTQZyc+ZA= github.com/yomorun/yomo-codec-golang v0.4.0/go.mod h1:r/611MRnZbd31sd9wNzoDKxYy4Tnt8WHnC4iDTAW3NY= +github.com/yomorun/yomo-codec-golang v1.0.0 h1:kZu4hcgE08PFQO80UPBw+ygjTfovzMlwOK40anQb6TY= +github.com/yomorun/yomo-codec-golang v1.0.0/go.mod h1:jxcwjw+UU1l9W4yMgGkVyFvLyLqcjFZ88AZLBxyr5O4= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= diff --git a/pkg/yomo/run.go b/pkg/yomo/run.go index b17e37b47..b46e856d0 100644 --- a/pkg/yomo/run.go +++ b/pkg/yomo/run.go @@ -158,7 +158,7 @@ type thermometerDataFormatter struct { func (w *thermometerDataFormatter) Write(b []byte) (int, error) { var mold = []thermometerData{} - proto := codes.NewProtoCodec("0x20") + proto := codes.NewProtoCodec(packetutils.KeyOf("0x20")) proto.UnmarshalStruct(b, &mold) fmt.Printf("%v:\t %v\n", time.Now().Format("2006-01-02 15:04:05"), mold) // debug: return 0, nil