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
|
return *ve, nil
|
||||||
case []byte:
|
case []byte:
|
||||||
return ve, nil
|
return ve, nil
|
||||||
|
case *Frame:
|
||||||
|
return ve.Data, nil
|
||||||
case *Message:
|
case *Message:
|
||||||
return ve.Body, nil
|
return ve.Body, nil
|
||||||
}
|
}
|
||||||
@ -86,6 +88,8 @@ func (n *noopCodec) Unmarshal(d []byte, v interface{}) error {
|
|||||||
ve = d
|
ve = d
|
||||||
case *[]byte:
|
case *[]byte:
|
||||||
*ve = d
|
*ve = d
|
||||||
|
case *Frame:
|
||||||
|
ve.Data = d
|
||||||
case *Message:
|
case *Message:
|
||||||
ve.Body = d
|
ve.Body = d
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user