yaml_go110.go 373 B

1234567891011121314
  1. // This file contains changes that are only compatible with go 1.10 and onwards.
  2. // +build go1.10
  3. package yaml
  4. import "encoding/json"
  5. // DisallowUnknownFields configures the JSON decoder to error out if unknown
  6. // fields come along, instead of dropping them by default.
  7. func DisallowUnknownFields(d *json.Decoder) *json.Decoder {
  8. d.DisallowUnknownFields()
  9. return d
  10. }