blob: ab3e06a222a6dfff779e619e4ec196398ae600a0 [file] [log] [blame]
Matteo Scandoloa4285862020-12-01 18:10:10 -08001// This file contains changes that are only compatible with go 1.10 and onwards.
2
3// +build go1.10
4
5package yaml
6
7import "encoding/json"
8
9// DisallowUnknownFields configures the JSON decoder to error out if unknown
10// fields come along, instead of dropping them by default.
11func DisallowUnknownFields(d *json.Decoder) *json.Decoder {
12 d.DisallowUnknownFields()
13 return d
14}