Skip to content

Commit

Permalink
Run gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlking committed Mar 6, 2024
1 parent e052771 commit 8e03a67
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion api/filters/nameref/nameref.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (f Filter) selectReferral(
}
candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer, true))
if len(candidates) > 1 {
candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer, false))
candidates = doSieve(candidates, prefixSuffixEquals(f.Referrer, false))
}
if len(candidates) == 1 {
return candidates[0], nil
Expand Down
6 changes: 2 additions & 4 deletions api/krusty/configmaps_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ metadata:

// Regression test for https://github.com/kubernetes-sigs/kustomize/issues/5047
func TestPrefixSuffix(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th := kusttest_test.MakeHarness(t)
th.WriteF("kustomization.yaml", `
resources:
- a
Expand Down Expand Up @@ -647,7 +647,6 @@ resources:
nameSuffix: api
`)


m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1
Expand Down Expand Up @@ -690,7 +689,7 @@ metadata:

// Regression test for https://github.com/kubernetes-sigs/kustomize/issues/5047
func TestPrefixSuffix2(t *testing.T) {
th := kusttest_test.MakeHarness(t)
th := kusttest_test.MakeHarness(t)
th.WriteF("kustomization.yaml", `
resources:
- a
Expand Down Expand Up @@ -734,7 +733,6 @@ configMapGenerator:
- name: "-example-configmap"
`)


m := th.Run(".", th.MakeDefaultOptions())
th.AssertActualEqualsExpected(m, `
apiVersion: apps/v1
Expand Down
4 changes: 3 additions & 1 deletion api/resource/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ func (r *Resource) DeepCopy() *Resource {
// the resource.
// TODO: move to RNode, use GetMeta to improve performance.
// TODO: make a version of mergeStringMaps that is build-annotation aware
// to avoid repeatedly setting refby and genargs annotations
//
// to avoid repeatedly setting refby and genargs annotations
//
// Must remove the kustomize bit at the end.
func (r *Resource) CopyMergeMetaDataFieldsFrom(other *Resource) error {
if err := r.SetLabels(
Expand Down

0 comments on commit 8e03a67

Please sign in to comment.