1 | package encoding |
---|---|
2 | |
3 | type BinaryMarshaler interface { |
4 | MarshalBinary() (data []byte, err error) |
5 | } |
6 | type BinaryUnmarshaler interface { |
7 | UnmarshalBinary(data []byte) error |
8 | } |
9 | |
10 | type TextMarshaler interface { |
11 | MarshalText() (text []byte, err error) |
12 | } |
13 | type TextUnmarshaler interface { |
14 | UnmarshalText(text []byte) error |
15 | } |
16 |