From d1806e2883ac76ad094ecc3d996cb0b566597650 Mon Sep 17 00:00:00 2001 From: Wang Date: Sat, 2 Apr 2022 10:11:12 -0700 Subject: [PATCH] Fix codec/bytes (#2466) * Update marshaler.go Byes codec always return error "invalid message" now. * Update go.mod Update package name * Update go.mod --- codec/bytes/marshaler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codec/bytes/marshaler.go b/codec/bytes/marshaler.go index 1c48b449..fcaa5234 100644 --- a/codec/bytes/marshaler.go +++ b/codec/bytes/marshaler.go @@ -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 }