Skip to content

Commit 1e95d05

Browse files
authored
Merge pull request #3906 from BenTheElder/yaml-yaml
migrate off of gopkg.in/yaml.v3
2 parents bbb7bb0 + b229bcf commit 1e95d05

File tree

6 files changed

+9
-7
lines changed

6 files changed

+9
-7
lines changed

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ require (
2020
github.com/pkg/errors v0.9.1
2121
github.com/spf13/cobra v1.8.0
2222
github.com/spf13/pflag v1.0.5
23-
gopkg.in/yaml.v3 v3.0.1
2423
sigs.k8s.io/yaml v1.4.0
2524
)
2625

2726
require (
2827
github.com/inconshreveable/mousetrap v1.1.0 // indirect
2928
github.com/kr/text v0.2.0 // indirect
3029
golang.org/x/sys v0.6.0 // indirect
30+
// TODO: https://github.com/google/safetext/issues/9
31+
gopkg.in/yaml.v3 v3.0.1 // indirect
3132
)

pkg/apis/config/v1alpha4/yaml.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Custom YAML (de)serialization for these types
2727
*/
2828

2929
// UnmarshalYAML implements custom decoding YAML
30-
// https://godoc.org/gopkg.in/yaml.v3
30+
// https://godoc.org/sigs.k8s.io/yaml/goyaml.v3
3131
func (m *Mount) UnmarshalYAML(unmarshal func(interface{}) error) error {
3232
// first unmarshal in the alias type (to avoid a recursion loop on unmarshal)
3333
type MountAlias Mount
@@ -50,7 +50,7 @@ func (m *Mount) UnmarshalYAML(unmarshal func(interface{}) error) error {
5050
}
5151

5252
// UnmarshalYAML implements custom decoding YAML
53-
// https://godoc.org/gopkg.in/yaml.v3
53+
// https://godoc.org/sigs.k8s.io/yaml/goyaml.v3
5454
func (p *PortMapping) UnmarshalYAML(unmarshal func(interface{}) error) error {
5555
// first unmarshal in the alias type (to avoid a recursion loop on unmarshal)
5656
type PortMappingAlias PortMapping

pkg/cluster/internal/kubeconfig/internal/kubeconfig/encode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ package kubeconfig
1919
import (
2020
"bytes"
2121

22-
yaml "gopkg.in/yaml.v3"
2322
kubeyaml "sigs.k8s.io/yaml"
23+
yaml "sigs.k8s.io/yaml/goyaml.v3"
2424

2525
"sigs.k8s.io/kind/pkg/errors"
2626
)

pkg/cluster/internal/kubeconfig/internal/kubeconfig/read.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"io"
2121
"os"
2222

23-
yaml "gopkg.in/yaml.v3"
23+
yaml "sigs.k8s.io/yaml/goyaml.v3"
2424

2525
"sigs.k8s.io/kind/pkg/errors"
2626
)

pkg/internal/apis/config/encoding/load.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"bytes"
2121
"os"
2222

23-
yaml "gopkg.in/yaml.v3"
23+
yaml "sigs.k8s.io/yaml/goyaml.v3"
2424

2525
"sigs.k8s.io/kind/pkg/apis/config/v1alpha4"
2626
"sigs.k8s.io/kind/pkg/errors"

pkg/internal/patch/toml.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ import (
2323
burntoml "github.com/BurntSushi/toml"
2424
jsonpatch "github.com/evanphx/json-patch/v5"
2525
toml "github.com/pelletier/go-toml"
26-
yaml "gopkg.in/yaml.v3"
26+
27+
yaml "sigs.k8s.io/yaml/goyaml.v3"
2728

2829
"sigs.k8s.io/kind/pkg/errors"
2930
)

0 commit comments

Comments
 (0)