-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Closed
Description
The yaml library we are using now support UnmarshalStrict which will return an error for for unknowns, or double definitions
https://godoc.org/gopkg.in/yaml.v2#UnmarshalStrict
After start using UnmarshalStrict CheckOverflow will be no longer needer
Lines 22 to 31 in dfd6709
| func CheckOverflow(m map[string]interface{}, ctx string) error { | |
| if len(m) > 0 { | |
| var keys []string | |
| for k := range m { | |
| keys = append(keys, k) | |
| } | |
| return fmt.Errorf("unknown fields in %s: %s", ctx, strings.Join(keys, ", ")) | |
| } | |
| return nil | |
| } |
Reactions are currently unavailable