(bytes []byte)
| 101 | type Status int |
| 102 | |
| 103 | func (s *Status) UnmarshalJSON(bytes []byte) error { |
| 104 | str := "" |
| 105 | err := json.Unmarshal(bytes, &str) |
| 106 | if err != nil { |
| 107 | return err |
| 108 | } |
| 109 | *s = ParseStatus(str) |
| 110 | return nil |
| 111 | } |
| 112 | |
| 113 | func (s *Status) MarshalJSON() ([]byte, error) { |
| 114 | return json.Marshal(s.String()) |
nothing calls this directly
no test coverage detected