1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-09-16 08:36:30 +02:00

Fix codec/bytes (#2466)

* Update marshaler.go

Byes codec always return error "invalid message" now.

* Update go.mod

Update package name

* Update go.mod
This commit is contained in:
Wang
2022-04-02 10:11:12 -07:00
committed by GitHub
parent 1f086a3002
commit d1806e2883

View File

@@ -27,8 +27,10 @@ func (n Marshaler) Unmarshal(d []byte, v interface{}) error {
switch ve := v.(type) {
case *[]byte:
*ve = d
return nil
case *Message:
ve.Body = d
return nil
}
return codec.ErrInvalidMessage
}