MarshalText implements encoding.TextMarshaler.
()
| 8 | |
| 9 | // MarshalText implements encoding.TextMarshaler. |
| 10 | func (uuid UUID) MarshalText() ([]byte, error) { |
| 11 | var js [36]byte |
| 12 | encodeHex(js[:], uuid) |
| 13 | return js[:], nil |
| 14 | } |
| 15 | |
| 16 | // UnmarshalText implements encoding.TextUnmarshaler. |
| 17 | func (uuid *UUID) UnmarshalText(data []byte) error { |