(src interface{})
| 19 | ) |
| 20 | |
| 21 | func (e *BookType) Scan(src interface{}) error { |
| 22 | switch s := src.(type) { |
| 23 | case []byte: |
| 24 | *e = BookType(s) |
| 25 | case string: |
| 26 | *e = BookType(s) |
| 27 | default: |
| 28 | return fmt.Errorf("unsupported scan type for BookType: %T", src) |
| 29 | } |
| 30 | return nil |
| 31 | } |
| 32 | |
| 33 | type NullBookType struct { |
| 34 | BookType BookType |
no test coverage detected