Matteo Scandolo | a428586 | 2020-12-01 18:10:10 -0800 | [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 | } |