Use the forked go-yaml module

This commit is contained in:
Katrina Verey
2021-06-22 15:54:54 -07:00
parent dac84d867e
commit 2e8a3b7c45
12 changed files with 11 additions and 12 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"
)

View File

@@ -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.

View File

@@ -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"
)

View File

@@ -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) {

View File

@@ -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 {

View File

@@ -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"
)