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