From 3f1edad4e6ba0a7876750aea55507fae14d8badf Mon Sep 17 00:00:00 2001 From: Milan Lenco Date: Wed, 11 Oct 2017 16:40:58 +0200 Subject: ODPM 266: Go-libmemif + 2 examples. Change-Id: Icdb9b9eb2314eff6c96afe7996fcf2728291de4a Signed-off-by: Milan Lenco --- vendor/gopkg.in/yaml.v2/decode.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'vendor/gopkg.in/yaml.v2/decode.go') diff --git a/vendor/gopkg.in/yaml.v2/decode.go b/vendor/gopkg.in/yaml.v2/decode.go index db1f5f2..052ecfc 100644 --- a/vendor/gopkg.in/yaml.v2/decode.go +++ b/vendor/gopkg.in/yaml.v2/decode.go @@ -190,7 +190,6 @@ type decoder struct { aliases map[string]bool mapType reflect.Type terrors []string - strict bool } var ( @@ -200,8 +199,8 @@ 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 } @@ -640,8 +639,6 @@ func (d *decoder) mappingStruct(n *node, out reflect.Value) (good bool) { 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 -- cgit 1.2.3-korg