Decode is a method on MessagePackCodecDecoder that decodes MessagePack data into the provided interface; returns an error if any decoding issues occur.
(msg interface{})
| 92 | // Decode is a method on MessagePackCodecDecoder that decodes MessagePack data |
| 93 | // into the provided interface; returns an error if any decoding issues occur. |
| 94 | func (m *MessagePackCodecDecoder) Decode(msg interface{}) error { |
| 95 | if m.dec == nil { |
| 96 | return errors.New("decoder not initialized") |
| 97 | } |
| 98 | return m.dec.Decode(msg) |
| 99 | } |
| 100 | |
| 101 | // Decode on MessagePackCodec type, using a byte slice as input. |
| 102 | func (m *MessagePackCodec) Decode(in []byte, out interface{}) error { |