summaryrefslogtreecommitdiff
path: root/vendor/sigs.k8s.io/yaml/yaml_go110.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/sigs.k8s.io/yaml/yaml_go110.go')
-rw-r--r--vendor/sigs.k8s.io/yaml/yaml_go110.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/sigs.k8s.io/yaml/yaml_go110.go b/vendor/sigs.k8s.io/yaml/yaml_go110.go
new file mode 100644
index 000000000..ab3e06a22
--- /dev/null
+++ b/vendor/sigs.k8s.io/yaml/yaml_go110.go
@@ -0,0 +1,14 @@
+// This file contains changes that are only compatible with go 1.10 and onwards.
+
+// +build go1.10
+
+package yaml
+
+import "encoding/json"
+
+// DisallowUnknownFields configures the JSON decoder to error out if unknown
+// fields come along, instead of dropping them by default.
+func DisallowUnknownFields(d *json.Decoder) *json.Decoder {
+ d.DisallowUnknownFields()
+ return d
+}