UnmarshalJSON implements json.Unmarshaler.
(data []byte)
| 108 | |
| 109 | // UnmarshalJSON implements json.Unmarshaler. |
| 110 | func (nu *NullUUID) UnmarshalJSON(data []byte) error { |
| 111 | if bytes.Equal(data, jsonNull) { |
| 112 | *nu = NullUUID{} |
| 113 | return nil // valid null UUID |
| 114 | } |
| 115 | err := json.Unmarshal(data, &nu.UUID) |
| 116 | nu.Valid = err == nil |
| 117 | return err |
| 118 | } |
nothing calls this directly
no outgoing calls
no test coverage detected