mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-02-07 22:32:55 +08:00
af94dada8b
Switch to sigs.k8s.io/yaml from ghodss/yaml Kubernetes-commit: f212b9db236344d3121879e609d53b79f9f106f9
15 lines
373 B
Go
15 lines
373 B
Go
// 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
|
|
}
|