mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00

To remove the dependency on ghodss/yaml. Replaced this dependency with sigs.k8s.io/yaml. This wil help to remove the ghodss/yaml dependency from main kubernetes repository. xref: https://github.com/kubernetes/kubernetes/issues/77024
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
|
|
}
|