Lines Matching refs:typ
49 func checkUnknownFields(data []byte, typ reflect.Type) error {
50 if typ.Kind() != reflect.Ptr || typ.Elem().Kind() != reflect.Struct {
53 return checkUnknownFieldsRec(data, "", typ)
56 func checkUnknownFieldsRec(data []byte, prefix string, typ reflect.Type) error {
57 if typ.Kind() == reflect.Ptr {
58 typ = typ.Elem()
60 if typ.Kind() != reflect.Struct {
64 for i := 0; i < typ.NumField(); i++ {
65 field := typ.Field(i)
109 func checkUnknownFieldsStruct(val interface{}, prefix string, typ reflect.Type) error {
110 if typ.Kind() == reflect.Ptr {
111 typ = typ.Elem()
113 if typ.Kind() != reflect.Struct {
116 if typ.PkgPath() == "time" && typ.Name() == "Time" {
123 return checkUnknownFieldsRec(inner, prefix, typ)