From f0965d6d0323dcc4e21a2b8a4b6c4d1a83e9a32e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 08:27:43 +0800 Subject: [PATCH] build(deps): bump github.com/goccy/go-yaml from 1.13.9 to 1.14.0 (#1782) * build(deps): bump github.com/goccy/go-yaml from 1.13.9 to 1.14.0 Bumps [github.com/goccy/go-yaml](https://github.com/goccy/go-yaml) from 1.13.9 to 1.14.0. - [Release notes](https://github.com/goccy/go-yaml/releases) - [Changelog](https://github.com/goccy/go-yaml/blob/master/CHANGELOG.md) - [Commits](https://github.com/goccy/go-yaml/compare/v1.13.9...v1.14.0) --- updated-dependencies: - dependency-name: github.com/goccy/go-yaml dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] * feat(yaml): allow duplicate keys in strict mode Signed-off-by: yxxhero --------- Signed-off-by: dependabot[bot] Signed-off-by: yxxhero Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: yxxhero --- go.mod | 2 +- go.sum | 4 ++-- pkg/yaml/yaml.go | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 0357cd6d..fc59307e 100644 --- a/go.mod +++ b/go.mod @@ -8,7 +8,7 @@ require ( github.com/Masterminds/sprig/v3 v3.3.0 github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc github.com/go-test/deep v1.1.1 - github.com/goccy/go-yaml v1.13.9 + github.com/goccy/go-yaml v1.14.0 github.com/golang/mock v1.6.0 github.com/google/go-cmp v0.6.0 github.com/gosuri/uitable v0.0.4 diff --git a/go.sum b/go.sum index 0fa44e25..bb156b88 100644 --- a/go.sum +++ b/go.sum @@ -536,8 +536,8 @@ github.com/go-viper/mapstructure/v2 v2.2.1 h1:ZAaOCxANMuZx5RCeg0mBdEZk7DZasvvZIx github.com/go-viper/mapstructure/v2 v2.2.1/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/goccy/go-yaml v1.13.9 h1:D/LhDa7E5HS/iYxSZzikUSHt1U9q/TeymVBJwodaglc= -github.com/goccy/go-yaml v1.13.9/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= +github.com/goccy/go-yaml v1.14.0 h1:G/NDXJvf1CX0FshjxKn2AOL0MnrxsSJNpY9FpvMRblw= +github.com/goccy/go-yaml v1.14.0/go.mod h1:XBurs7gK8ATbW4ZPGKgcbrY1Br56PdM69F7LkFRi1kA= github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= diff --git a/pkg/yaml/yaml.go b/pkg/yaml/yaml.go index 08a5eb72..06054261 100644 --- a/pkg/yaml/yaml.go +++ b/pkg/yaml/yaml.go @@ -42,6 +42,8 @@ func NewDecoder(data []byte, strict bool) func(any) error { if strict { opts = append(opts, yaml.DisallowUnknownField()) } + // allow duplicate keys + opts = append(opts, yaml.AllowDuplicateMapKey()) decoder := yaml.NewDecoder( bytes.NewReader(data),