Write writes the value v to the encoder e using C alignment rules. If v is an array or slice, then each of the elements will be written, sequentially. Zeros are used as for paddinge.
(e *Encoder, v interface{})
| 23 | // If v is an array or slice, then each of the elements will be written, |
| 24 | // sequentially. Zeros are used as for paddinge. |
| 25 | func Write(e *Encoder, v interface{}) { |
| 26 | encode(e, reflect.ValueOf(v)) |
| 27 | } |
| 28 | |
| 29 | func encode(e *Encoder, v reflect.Value) { |
| 30 | t := v.Type() |