add Frame support in noop codec

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2020-11-25 09:59:28 +03:00
parent 8a50a2d0b8
commit 2101e994d9

View File

@ -74,6 +74,8 @@ func (n *noopCodec) Marshal(v interface{}) ([]byte, error) {
return *ve, nil
case []byte:
return ve, nil
case *Frame:
return ve.Data, nil
case *Message:
return ve.Body, nil
}
@ -86,6 +88,8 @@ func (n *noopCodec) Unmarshal(d []byte, v interface{}) error {
ve = d
case *[]byte:
*ve = d
case *Frame:
ve.Data = d
case *Message:
ve.Body = d
}