Skip to content

Commit 44cff9b

Browse files
authored
Replace github.com/ghodss/yaml w/ sigs.k8s.io/yaml (#366)
Replace unmaintained yaml libs: github.com/ghodss/yaml → sigs.k8s.io/yaml gopkg.in/yaml.v3 → go.yaml.in/yaml/v3
1 parent 1c7d200 commit 44cff9b

File tree

23 files changed

+24
-30
lines changed

23 files changed

+24
-30
lines changed

cmd/gen-qbec-swagger/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"os"
2323
"time"
2424

25-
"github.com/ghodss/yaml"
25+
"sigs.k8s.io/yaml"
2626
)
2727

2828
func main() {

go.mod

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ go 1.24.6
55
require (
66
github.com/bmatcuk/doublestar/v4 v4.9.1
77
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
8-
github.com/ghodss/yaml v1.0.0
98
github.com/go-openapi/spec v0.22.0
109
github.com/go-openapi/strfmt v0.24.0
1110
github.com/go-openapi/validate v0.25.0
@@ -20,15 +19,16 @@ require (
2019
github.com/spf13/pflag v1.0.10
2120
github.com/stretchr/testify v1.11.1
2221
github.com/tidwall/pretty v1.2.1
22+
go.yaml.in/yaml/v3 v3.0.4
2323
google.golang.org/protobuf v1.36.10
24-
gopkg.in/yaml.v3 v3.0.1
2524
k8s.io/api v0.34.1
2625
k8s.io/apimachinery v0.34.1
2726
k8s.io/cli-runtime v0.34.1
2827
k8s.io/client-go v0.34.1
2928
k8s.io/gengo v0.0.0-20250922181213-ec3ebc5fd46b
3029
k8s.io/kube-openapi v0.0.0-20250910181357-589584f1c912
3130
k8s.io/kubectl v0.34.1
31+
sigs.k8s.io/yaml v1.6.0
3232
)
3333

3434
require (
@@ -86,7 +86,6 @@ require (
8686
github.com/xlab/treeprint v1.2.0 // indirect
8787
go.mongodb.org/mongo-driver v1.17.4 // indirect
8888
go.yaml.in/yaml/v2 v2.4.2 // indirect
89-
go.yaml.in/yaml/v3 v3.0.4 // indirect
9089
golang.org/x/crypto v0.42.0 // indirect
9190
golang.org/x/net v0.44.0 // indirect
9291
golang.org/x/oauth2 v0.27.0 // indirect
@@ -97,7 +96,7 @@ require (
9796
golang.org/x/time v0.9.0 // indirect
9897
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
9998
gopkg.in/inf.v0 v0.9.1 // indirect
100-
gopkg.in/yaml.v2 v2.4.0 // indirect
99+
gopkg.in/yaml.v3 v3.0.1 // indirect
101100
k8s.io/component-base v0.34.1 // indirect
102101
k8s.io/klog/v2 v2.130.1 // indirect
103102
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
@@ -106,5 +105,4 @@ require (
106105
sigs.k8s.io/kustomize/kyaml v0.20.1 // indirect
107106
sigs.k8s.io/randfill v1.0.0 // indirect
108107
sigs.k8s.io/structured-merge-diff/v6 v6.3.0 // indirect
109-
sigs.k8s.io/yaml v1.6.0 // indirect
110108
)

go.sum

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f h1:Wl78ApPPB2
3131
github.com/exponent-io/jsonpath v0.0.0-20210407135951-1de76d718b3f/go.mod h1:OSYXu++VVOHnXeitef/D8n/6y4QV8uLHSFXX4NeXMGc=
3232
github.com/fxamacker/cbor/v2 v2.9.0 h1:NpKPmjDBgUfBms6tr6JZkTHtfFGcMKsw3eGcmD/sapM=
3333
github.com/fxamacker/cbor/v2 v2.9.0/go.mod h1:vM4b+DJCtHn+zz7h3FFp/hDAI9WNWCsZj23V5ytsSxQ=
34-
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
35-
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
3634
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
3735
github.com/go-errors/errors v1.4.2/go.mod h1:sIVyrIiJhuEF+Pj9Ebtd6P/rEYROXFi3BopGUQ5a5Og=
3836
github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU=
@@ -250,8 +248,6 @@ gopkg.in/evanphx/json-patch.v4 v4.12.0/go.mod h1:p8EYWUEYMpynmqDbY58zCKCFZw8pRWM
250248
gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc=
251249
gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
252250
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
253-
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
254-
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
255251
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
256252
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
257253
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

internal/commands/common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ import (
2323
"strings"
2424
"sync"
2525

26-
"github.com/ghodss/yaml"
2726
"github.com/pkg/errors"
2827
"github.com/spf13/cobra"
2928
"github.com/splunk/qbec/internal/cmd"
@@ -32,6 +31,7 @@ import (
3231
"github.com/splunk/qbec/internal/remote"
3332
"github.com/splunk/qbec/internal/sio"
3433
"k8s.io/apimachinery/pkg/runtime/schema"
34+
"sigs.k8s.io/yaml"
3535
)
3636

3737
// ctxProvider provides standard configuration available to all commands

internal/commands/common_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import (
2121
"sync"
2222
"testing"
2323

24-
"github.com/ghodss/yaml"
2524
"github.com/pkg/errors"
2625
"github.com/splunk/qbec/internal/model"
2726
"github.com/stretchr/testify/assert"
2827
"github.com/stretchr/testify/require"
28+
"sigs.k8s.io/yaml"
2929
)
3030

3131
func TestRunInParallelNoObjects(t *testing.T) {

internal/commands/component.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,11 @@ import (
2222
"io"
2323
"strings"
2424

25-
"github.com/ghodss/yaml"
2625
"github.com/spf13/cobra"
2726
"github.com/splunk/qbec/internal/cmd"
2827
"github.com/splunk/qbec/internal/diff"
2928
"github.com/splunk/qbec/internal/model"
29+
"sigs.k8s.io/yaml"
3030
)
3131

3232
func newComponentCommand(cp ctxProvider) *cobra.Command {

internal/commands/diff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import (
2121
"sort"
2222
"sync"
2323

24-
"github.com/ghodss/yaml"
2524
"github.com/spf13/cobra"
2625
"github.com/splunk/qbec/internal/cmd"
2726
"github.com/splunk/qbec/internal/diff"
@@ -31,6 +30,7 @@ import (
3130
"github.com/splunk/qbec/internal/sio"
3231
"github.com/splunk/qbec/internal/types"
3332
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
33+
"sigs.k8s.io/yaml"
3434
)
3535

3636
type diffIgnores struct {

internal/commands/env.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ import (
2020
"sort"
2121
"strings"
2222

23-
"github.com/ghodss/yaml"
2423
"github.com/spf13/cobra"
2524
"github.com/splunk/qbec/internal/cmd"
25+
"sigs.k8s.io/yaml"
2626
)
2727

2828
func newEnvCommand(cp ctxProvider) *cobra.Command {

internal/commands/fmtutil.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
"github.com/google/go-jsonnet/formatter"
3030
"github.com/tidwall/pretty"
31-
"gopkg.in/yaml.v3"
31+
"go.yaml.in/yaml/v3"
3232
)
3333

3434
func format(in []byte, filename string) ([]byte, error) {

internal/commands/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ import (
2222
"os"
2323
"path/filepath"
2424

25-
"github.com/ghodss/yaml"
2625
"github.com/spf13/cobra"
2726
"github.com/splunk/qbec/internal/cmd"
2827
"github.com/splunk/qbec/internal/model"
2928
"github.com/splunk/qbec/internal/remote"
3029
"github.com/splunk/qbec/internal/sio"
30+
"sigs.k8s.io/yaml"
3131
)
3232

3333
type initCommandConfig struct {

0 commit comments

Comments
 (0)