UnmarshalJSON reads AccessMode from a quoted string.
(b []byte)
| 674 | |
| 675 | // UnmarshalJSON reads AccessMode from a quoted string. |
| 676 | func (m *AccessMode) UnmarshalJSON(b []byte) error { |
| 677 | if b[0] != '"' || b[len(b)-1] != '"' { |
| 678 | return errors.New("syntax error") |
| 679 | } |
| 680 | |
| 681 | return m.UnmarshalText(b[1 : len(b)-1]) |
| 682 | } |
| 683 | |
| 684 | // Scan is an implementation of sql.Scanner interface. It expects the |
| 685 | // value to be a byte slice representation of an ASCII string. |
nothing calls this directly
no test coverage detected