add Frame support in noop codec
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
8a50a2d0b8
commit
2101e994d9
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user