Skip to content

Commit

Permalink
update yomo-codec to v1.0.0 (#57)
Browse files Browse the repository at this point in the history
close #57
  • Loading branch information
chenjunbiao authored Dec 11, 2020
1 parent 271d435 commit 14f2948
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion pkg/yomo/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 14f2948

Please sign in to comment.