Skip to content

Commit d416877

Browse files
committed
yaml.DisallowDuplicateKey no longer exists; it is the default now
Since https://github.com/goccy/go-yaml/releases/tag/v1.14.0 Signed-off-by: Jan Dubois <[email protected]>
1 parent 94ffd70 commit d416877

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/limayaml/marshal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func unmarshalDisk(dst *Disk, b []byte) error {
3636
}
3737

3838
func Unmarshal(data []byte, v interface{}, comment string) error {
39-
if err := yaml.UnmarshalWithOptions(data, v, yaml.DisallowDuplicateKey(), yaml.CustomUnmarshaler[Disk](unmarshalDisk)); err != nil {
39+
if err := yaml.UnmarshalWithOptions(data, v, yaml.CustomUnmarshaler[Disk](unmarshalDisk)); err != nil {
4040
return fmt.Errorf("failed to unmarshal YAML (%s): %w", comment, err)
4141
}
4242
// the go-yaml library doesn't catch all markup errors, unfortunately

pkg/networks/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ func loadCache() {
132132
if cache.err != nil {
133133
return
134134
}
135-
cache.err = yaml.UnmarshalWithOptions(b, &cache.cfg, yaml.DisallowDuplicateKey())
135+
cache.err = yaml.Unmarshal(b, &cache.cfg)
136136
if cache.err != nil {
137137
cache.err = fmt.Errorf("cannot parse %q: %w", cfgFile, cache.err)
138138
return

0 commit comments

Comments
 (0)