(bytes []byte)
| 8 | type Kind int |
| 9 | |
| 10 | func (k *Kind) UnmarshalJSON(bytes []byte) error { |
| 11 | str := "" |
| 12 | |
| 13 | err := json.Unmarshal(bytes, &str) |
| 14 | if err != nil { |
| 15 | return err |
| 16 | } |
| 17 | *k = ParseKind(str) |
| 18 | return nil |
| 19 | } |
| 20 | |
| 21 | func (k *Kind) MarshalJSON() ([]byte, error) { |
| 22 | return json.Marshal(k.String()) |
nothing calls this directly
no test coverage detected