Decode on MessagePackCodec type, using a byte slice as input.
(in []byte, out interface{})
| 100 | |
| 101 | // Decode on MessagePackCodec type, using a byte slice as input. |
| 102 | func (m *MessagePackCodec) Decode(in []byte, out interface{}) error { |
| 103 | // Create new decoder using the byte slice and MessagePack handle. |
| 104 | dec := codec.NewDecoderBytes(in, m.MsgPack) |
| 105 | |
| 106 | // Attempt to decode the byte slice into the desired output structure. |
| 107 | return dec.Decode(out) |
| 108 | } |
| 109 | |
| 110 | // AddExtension method allows for setting custom encoders/decoders for specific reflect.Types. |
| 111 | func (m *MessagePackCodec) AddExtension( |
no outgoing calls