Decode decodes the value held in the Decoder d into v. Decode creates slices, maps and pointer elements as needed. It treats values that implement encoding.BinaryUnmarshaler, encoding.TextUnmarshaler and proto.Message specially; see Encode.
(v reflect.Value, d Decoder)
| 373 | // It treats values that implement encoding.BinaryUnmarshaler, |
| 374 | // encoding.TextUnmarshaler and proto.Message specially; see Encode. |
| 375 | func Decode(v reflect.Value, d Decoder) error { |
| 376 | return wrap(decode(v, d), gcerr.InvalidArgument) |
| 377 | } |
| 378 | |
| 379 | func decode(v reflect.Value, d Decoder) error { |
| 380 | if !v.CanSet() { |