(src any)
| 36 | } |
| 37 | |
| 38 | func (k *Kind) Scan(src any) error { |
| 39 | switch v := src.(type) { |
| 40 | case string: |
| 41 | *k = ParseKind(v) |
| 42 | case []byte: |
| 43 | *k = ParseKind(string(v)) |
| 44 | case int: |
| 45 | *k = Kind(v) |
| 46 | case int64: |
| 47 | *k = Kind(v) |
| 48 | case int32: |
| 49 | *k = Kind(v) |
| 50 | case int16: |
| 51 | *k = Kind(v) |
| 52 | case int8: |
| 53 | *k = Kind(v) |
| 54 | case uint: |
| 55 | *k = Kind(v) |
| 56 | case uint64: |
| 57 | *k = Kind(v) |
| 58 | case uint32: |
| 59 | *k = Kind(v) |
| 60 | case uint16: |
| 61 | *k = Kind(v) |
| 62 | case uint8: |
| 63 | *k = Kind(v) |
| 64 | |
| 65 | default: |
| 66 | *k = OpenKind |
| 67 | } |
| 68 | return nil |
| 69 | } |
| 70 | |
| 71 | func ParseKind(string2 string) Kind { |
| 72 | switch string2 { |
no test coverage detected