Read reads the value pointed at p from the decoder d using C alignment rules. If v is an array or slice, then each of the elements will be read, sequentially.
(d *Decoder, p interface{})
| 23 | // If v is an array or slice, then each of the elements will be read, |
| 24 | // sequentially. |
| 25 | func Read(d *Decoder, p interface{}) { |
| 26 | v := reflect.ValueOf(p) |
| 27 | if v.Kind() != reflect.Ptr { |
| 28 | panic(fmt.Errorf("p must be pointer, got %T", p)) |
| 29 | } |
| 30 | decode(d, v) |
| 31 | } |
| 32 | |
| 33 | func decode(d *Decoder, v reflect.Value) { |
| 34 | t := v.Type() |
no test coverage detected