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