Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Aceralon committed Nov 5, 2023
1 parent 0a54ecf commit 6f88611
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions kustomize/commands/edit/fix/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ import (
"strconv"
"strings"

"sigs.k8s.io/yaml"

"sigs.k8s.io/kustomize/api/types"
"sigs.k8s.io/kustomize/kyaml/filesys"
"sigs.k8s.io/kustomize/kyaml/kio"
"sigs.k8s.io/kustomize/kyaml/resid"
kyaml "sigs.k8s.io/kustomize/kyaml/yaml"
"sigs.k8s.io/yaml"
)

func ConvertVarsToReplacements(fSys filesys.FileSystem, k *types.Kustomization) error {
Expand Down Expand Up @@ -135,7 +134,7 @@ func getNodesFromFile(fileName string, fSys filesys.FileSystem) ([]*kyaml.RNode,
}
out := &bytes.Buffer{}
r := kio.ByteReadWriter{
Reader: bytes.NewReader(b),
Reader: bytes.NewBuffer(b),
Writer: out,
KeepReaderAnnotations: true,
OmitReaderAnnotations: true,
Expand Down
6 changes: 3 additions & 3 deletions kustomize/commands/edit/fix/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,9 +413,9 @@ spec:

fSys := filesys.MakeFsInMemory()
testutils_test.WriteTestKustomizationWith(fSys, kustomization)
fSys.WriteFile("pod.yaml", pod)
fSys.WriteFile("patch.yaml", patch)
cmd := NewCmdFix(fSys, os.Stdout)
assert.NoError(t, fSys.WriteFile("pod.yaml", pod))
assert.NoError(t, fSys.WriteFile("patch.yaml", patch))
var cmd = NewCmdFix(fSys, os.Stdout)
assert.NoError(t, cmd.Flags().Set("vars", "true"))
assert.NoError(t, cmd.RunE(cmd, nil))
content, err := testutils_test.ReadTestKustomization(fSys)
Expand Down

0 comments on commit 6f88611

Please sign in to comment.