Skip to content

Commit

Permalink
Use the forked go-yaml module
Browse files Browse the repository at this point in the history
  • Loading branch information
KnVerey committed Jun 28, 2021
1 parent dac84d8 commit 2e8a3b7
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion kyaml/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ require (
github.com/stretchr/testify v1.5.1
github.com/xlab/treeprint v0.0.0-20181112141820-a009c3971eca
go.starlark.net v0.0.0-20200306205701-8dd3e2ee1dd5
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776
k8s.io/kube-openapi v0.0.0-20210421082810-95288971da7e
)

Expand Down
1 change: 0 additions & 1 deletion kyaml/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0=
Expand Down
2 changes: 1 addition & 1 deletion kyaml/setters2/set.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
"strings"
"text/template"

goyaml "gopkg.in/yaml.v3"
"k8s.io/kube-openapi/pkg/validation/spec"
"k8s.io/kube-openapi/pkg/validation/strfmt"
"k8s.io/kube-openapi/pkg/validation/validate"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/fieldmeta"
goyaml "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
"sigs.k8s.io/kustomize/kyaml/kio"
"sigs.k8s.io/kustomize/kyaml/kio/kioutil"
"sigs.k8s.io/kustomize/kyaml/openapi"
Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/alias.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"bytes"
"io"

"gopkg.in/yaml.v3"
"sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
)

// Expose the yaml.v3 functions so this package can be used as a replacement
Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/compatibility.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"

y1_1 "gopkg.in/yaml.v2"
y1_2 "gopkg.in/yaml.v3"
"k8s.io/kube-openapi/pkg/validation/spec"
y1_2 "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
)

// typeToTag maps OpenAPI schema types to yaml 1.2 tags
Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/fns.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"

"github.com/davecgh/go-spew/spew"
"gopkg.in/yaml.v3"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
)

// Append creates an ElementAppender
Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/fns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"testing"

"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v3"
"sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
. "sigs.k8s.io/kustomize/kyaml/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/kfns.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
package yaml

import (
"gopkg.in/yaml.v3"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
)

// AnnotationClearer removes an annotation at metadata.annotations.
Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/rnode.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"strconv"
"strings"

"gopkg.in/yaml.v3"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
"sigs.k8s.io/kustomize/kyaml/yaml/internal/k8sgen/pkg/labels"
)

Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/rnode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gopkg.in/yaml.v3"
"sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
)

func TestRNodeHasNilEntryInList(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/serialization.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

package yaml

import "gopkg.in/yaml.v3"
import "sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"

func DoSerializationHacksOnNodes(nodes []*RNode) {
for _, node := range nodes {
Expand Down
2 changes: 1 addition & 1 deletion kyaml/yaml/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"bytes"
"strings"

"gopkg.in/yaml.v3"
"sigs.k8s.io/kustomize/kyaml/errors"
"sigs.k8s.io/kustomize/kyaml/internal/forked/github.com/go-yaml/yaml"
"sigs.k8s.io/kustomize/kyaml/sets"
)

Expand Down

0 comments on commit 2e8a3b7

Please sign in to comment.