From f2c7066088f9402f5065d3a272062f9625011a2b Mon Sep 17 00:00:00 2001 From: Arthur Mello Date: Thu, 5 Dec 2019 22:23:35 -0300 Subject: [PATCH] Remove leading/trailing newlines following whitespace linter recommendation --- kyaml/kio/filters/container.go | 1 - kyaml/kio/pkgio_writer.go | 1 - kyaml/yaml/fns_test.go | 3 --- kyaml/yaml/walk/associative_sequence.go | 1 - 4 files changed, 6 deletions(-) diff --git a/kyaml/kio/filters/container.go b/kyaml/kio/filters/container.go index aa929a644..a4ec6f156 100644 --- a/kyaml/kio/filters/container.go +++ b/kyaml/kio/filters/container.go @@ -133,7 +133,6 @@ func (c *ContainerFilter) getArgs() []string { args = append(args, "-e", strings.Split(pair, "=")[0]) } return append(args, c.Image) - } // getCommand returns a command which will apply the GrepFilter using the container image diff --git a/kyaml/kio/pkgio_writer.go b/kyaml/kio/pkgio_writer.go index e768e4ab1..91977f7a9 100644 --- a/kyaml/kio/pkgio_writer.go +++ b/kyaml/kio/pkgio_writer.go @@ -128,7 +128,6 @@ func (r LocalPackageWriter) errorIfMissingRequiredAnnotation(nodes []*yaml.RNode } func (r LocalPackageWriter) indexByFilePath(nodes []*yaml.RNode) (map[string][]*yaml.RNode, error) { - outputFiles := map[string][]*yaml.RNode{} for i := range nodes { // parse the file write path diff --git a/kyaml/yaml/fns_test.go b/kyaml/yaml/fns_test.go index 620692dea..cb587b52e 100644 --- a/kyaml/yaml/fns_test.go +++ b/kyaml/yaml/fns_test.go @@ -143,7 +143,6 @@ r: s ` func TestLookup_Fn_create(t *testing.T) { - // primitive node, err := Parse(s) assert.NoError(t, err) @@ -167,7 +166,6 @@ r: s `, assertNoErrorString(t)(node.String())) assert.Equal(t, `h `, assertNoErrorString(t)(rn.String())) - } func TestLookup_Fn_create2(t *testing.T) { @@ -442,7 +440,6 @@ foo: baz assert.Contains(t, err.Error(), "wrong Node Kind") assert.Equal(t, `foo: baz `, assertNoErrorString(t)(node.String())) - } func TestErrorIfInvalid(t *testing.T) { diff --git a/kyaml/yaml/walk/associative_sequence.go b/kyaml/yaml/walk/associative_sequence.go index cd5946939..1ef341607 100644 --- a/kyaml/yaml/walk/associative_sequence.go +++ b/kyaml/yaml/walk/associative_sequence.go @@ -12,7 +12,6 @@ import ( ) func (l *Walker) walkAssociativeSequence() (*yaml.RNode, error) { - // may require initializing the dest node dest, err := l.Sources.setDestNode(l.VisitList(l.Sources, AssociativeList)) if dest == nil || err != nil {