From 7a79a08c0e6ba7d6990841555e2f1d47a2b6c5f2 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Mon, 6 Mar 2023 18:19:54 +0800 Subject: [PATCH] refactor: replace `github.com/ghodss/yaml` with `sigs.k8s.io/yaml` (#7127) At the time of making this commit, the package `github.com/ghodss/yaml` is no longer actively maintained. `sigs.k8s.io/yaml` is a permanent fork of `ghodss/yaml` and is actively maintained by Kubernetes SIG. Signed-off-by: Eng Zer Jun --- development/tools/jobs/tester/tester.go | 2 +- development/tools/jobs/testinfra/branchprotector_test.go | 2 +- go.mod | 1 - go.sum | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/development/tools/jobs/tester/tester.go b/development/tools/jobs/tester/tester.go index 6a700e114ed0..9b2dbc5427d8 100644 --- a/development/tools/jobs/tester/tester.go +++ b/development/tools/jobs/tester/tester.go @@ -6,7 +6,6 @@ import ( "os" "testing" - "github.com/ghodss/yaml" "github.com/kyma-project/test-infra/development/tools/jobs/releases" "github.com/kyma-project/test-infra/development/tools/jobs/tester/preset" "github.com/pkg/errors" @@ -15,6 +14,7 @@ import ( v1 "k8s.io/api/core/v1" prowapi "k8s.io/test-infra/prow/apis/prowjobs/v1" "k8s.io/test-infra/prow/config" + "sigs.k8s.io/yaml" ) const ( diff --git a/development/tools/jobs/testinfra/branchprotector_test.go b/development/tools/jobs/testinfra/branchprotector_test.go index acc7aa501601..252a432f5c13 100644 --- a/development/tools/jobs/testinfra/branchprotector_test.go +++ b/development/tools/jobs/testinfra/branchprotector_test.go @@ -6,11 +6,11 @@ import ( "os" "testing" - "github.com/ghodss/yaml" "github.com/kyma-project/test-infra/development/tools/jobs/releases" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "k8s.io/test-infra/prow/config" + "sigs.k8s.io/yaml" ) func TestBranchProtection(t *testing.T) { diff --git a/go.mod b/go.mod index b06e40688001..947440d206bf 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,6 @@ require ( github.com/containerd/typeurl v1.0.2 github.com/forestgiant/sliceutil v0.0.0-20160425183142-94783f95db6c github.com/fsouza/go-dockerclient v1.9.5 - github.com/ghodss/yaml v1.0.0 github.com/go-playground/validator/v10 v10.11.2 github.com/go-yaml/yaml v2.1.0+incompatible github.com/google/go-containerregistry v0.13.0 diff --git a/go.sum b/go.sum index 1a14eb289bdd..86d3e55c7fd9 100644 --- a/go.sum +++ b/go.sum @@ -462,7 +462,6 @@ github.com/fvbommel/sortorder v1.0.1/go.mod h1:uk88iVf1ovNn1iLfgUVU2F9o5eO30ui72 github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gitleaks/go-gitdiff v0.8.0 h1:7aExTZm+K/M/EQKOyYcub8rIAdWK6ONxPGuRzxmWW+0= github.com/gitleaks/go-gitdiff v0.8.0/go.mod h1:pKz0X4YzCKZs30BL+weqBIG7mx0jl4tF1uXV9ZyNvrA=