aliases map[string]bool
mapType reflect.Type
terrors []string
- strict bool
}
var (
ifaceType = defaultMapType.Elem()
)
-func newDecoder(strict bool) *decoder {
- d := &decoder{mapType: defaultMapType, strict: strict}
+func newDecoder() *decoder {
+ d := &decoder{mapType: defaultMapType}
d.aliases = make(map[string]bool)
return d
}
value := reflect.New(elemType).Elem()
d.unmarshal(n.children[i+1], value)
inlineMap.SetMapIndex(name, value)
- } else if d.strict {
- d.terrors = append(d.terrors, fmt.Sprintf("line %d: field %s not found in struct %s", n.line+1, name.String(), out.Type()))
}
}
return true