aboutsummaryrefslogtreecommitdiffstats
path: root/src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go
diff options
context:
space:
mode:
authorHuabingZhao <zhao.huabing@zte.com.cn>2017-10-18 03:25:50 +0000
committerHuabingZhao <zhao.huabing@zte.com.cn>2017-10-18 22:41:11 +0800
commite3e197dba342c76cb05aa16652682094020d8abf (patch)
tree97cbadfaaba08de782b774ae641741c997e65630 /src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go
parentb6ccf74fe168b2add28c83c79d07c9758239440d (diff)
Update the yaml for go lib to latest
Update yaml for go lib to latest and it's license has been changed to Apache 2. According to the upstream project, the license of go-yaml has been updated to Apache 2:https://github.com/go-yaml/yaml/blob/v2/LICENSE, change the reference code license within oom-registrator repo accordingly. Issue-Id: OOM-365 Change-Id: Idce4bfda96456031a296682b0fb6e663170ec099 Signed-off-by: HuabingZhao <zhao.huabing@zte.com.cn>
Diffstat (limited to 'src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go')
-rw-r--r--src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go b/src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go
index 36d6b88..bf18884 100644
--- a/src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go
+++ b/src/kube2msb/vendor/gopkg.in/yaml.v2/yaml.go
@@ -77,8 +77,19 @@ type Marshaler interface {
// supported tag options.
//
func Unmarshal(in []byte, out interface{}) (err error) {
+ return unmarshal(in, out, false)
+}
+
+// UnmarshalStrict is like Unmarshal except that any fields that are found
+// in the data that do not have corresponding struct members will result in
+// an error.
+func UnmarshalStrict(in []byte, out interface{}) (err error) {
+ return unmarshal(in, out, true)
+}
+
+func unmarshal(in []byte, out interface{}, strict bool) (err error) {
defer handleErr(&err)
- d := newDecoder()
+ d := newDecoder(strict)
p := newParser(in)
defer p.destroy()
node := p.parse()