blob: ab3e06a222a6dfff779e619e4ec196398ae600a0 [file] [log] [blame]
Scott Bakere7144bc2019-10-01 14:16:47 -07001// 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}