MarshalText implements [encoding.TextMarshaler].
()
| 147 | |
| 148 | // MarshalText implements [encoding.TextMarshaler]. |
| 149 | func (c Code) MarshalText() ([]byte, error) { |
| 150 | return []byte(c.String()), nil |
| 151 | } |
| 152 | |
| 153 | // UnmarshalText implements [encoding.TextUnmarshaler]. |
| 154 | func (c *Code) UnmarshalText(data []byte) error { |