in types/types.go [45:72]
func (k *Kind) UnmarshalJSON(b []byte) error {
var s string
if err := json.Unmarshal(b, &s); err != nil {
return err
}
switch strings.ToUpper(s) {
case "ALIAS":
*k = AliasKind
case "BASIC":
*k = BasicKind
case "INTERFACE":
*k = InterfaceKind
case "MAP":
*k = MapKind
case "POINTER":
*k = PointerKind
case "SLICE":
*k = SliceKind
case "STRUCT":
*k = StructKind
case "UNKNOWN":
*k = UnknownKind
default:
return fmt.Errorf("unknown kind %s", s)
}
return nil
}