1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-30 10:10:44 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
}