Unmarshal parses a wire-format message in b and places the decoded results in m. Unmarshal resets m before starting to unmarshal, so any existing data in m is always removed. Use UnmarshalMerge to preserve and append to existing data.
(b []byte, m Message)
| 54 | // Unmarshal resets m before starting to unmarshal, so any existing data in m is always |
| 55 | // removed. Use UnmarshalMerge to preserve and append to existing data. |
| 56 | func Unmarshal(b []byte, m Message) error { |
| 57 | m.Reset() |
| 58 | return UnmarshalMerge(b, m) |
| 59 | } |
| 60 | |
| 61 | // UnmarshalMerge parses a wire-format message in b and places the decoded results in m. |
| 62 | func UnmarshalMerge(b []byte, m Message) error { |