diff --git a/api/builtins/AnnotationsTransformer.go b/api/builtins/AnnotationsTransformer.go index dd6b3922a..ebb433163 100644 --- a/api/builtins/AnnotationsTransformer.go +++ b/api/builtins/AnnotationsTransformer.go @@ -17,7 +17,7 @@ type AnnotationsTransformerPlugin struct { } func (p *AnnotationsTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Annotations = nil p.FieldSpecs = nil return yaml.Unmarshal(c, p) diff --git a/api/builtins/HashTransformer.go b/api/builtins/HashTransformer.go index 8de0d94bd..135c6e18e 100644 --- a/api/builtins/HashTransformer.go +++ b/api/builtins/HashTransformer.go @@ -15,7 +15,7 @@ type HashTransformerPlugin struct { } func (p *HashTransformerPlugin) Config( - h *resmap.PluginHelpers, config []byte) (err error) { + h *resmap.PluginHelpers, _ []byte) (err error) { p.hasher = h.ResmapFactory().RF().Hasher() return nil } diff --git a/api/builtins/ImageTagTransformer.go b/api/builtins/ImageTagTransformer.go index 051d05521..0ce7bd797 100644 --- a/api/builtins/ImageTagTransformer.go +++ b/api/builtins/ImageTagTransformer.go @@ -23,7 +23,7 @@ type ImageTagTransformerPlugin struct { } func (p *ImageTagTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.ImageTag = types.Image{} p.FieldSpecs = nil return yaml.Unmarshal(c, p) diff --git a/api/builtins/LabelTransformer.go b/api/builtins/LabelTransformer.go index 200fac1b7..88df34561 100644 --- a/api/builtins/LabelTransformer.go +++ b/api/builtins/LabelTransformer.go @@ -17,7 +17,7 @@ type LabelTransformerPlugin struct { } func (p *LabelTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Labels = nil p.FieldSpecs = nil return yaml.Unmarshal(c, p) diff --git a/api/builtins/LegacyOrderTransformer.go b/api/builtins/LegacyOrderTransformer.go index 9612bf5df..322cea93a 100644 --- a/api/builtins/LegacyOrderTransformer.go +++ b/api/builtins/LegacyOrderTransformer.go @@ -20,7 +20,7 @@ type LegacyOrderTransformerPlugin struct{} // Nothing needed for configuration. func (p *LegacyOrderTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, _ []byte) (err error) { return nil } diff --git a/api/builtins/NamespaceTransformer.go b/api/builtins/NamespaceTransformer.go index 792a0d999..9bfa3eca8 100644 --- a/api/builtins/NamespaceTransformer.go +++ b/api/builtins/NamespaceTransformer.go @@ -22,7 +22,7 @@ type NamespaceTransformerPlugin struct { } func (p *NamespaceTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Namespace = "" p.FieldSpecs = nil return yaml.Unmarshal(c, p) @@ -75,7 +75,7 @@ func (p *NamespaceTransformerPlugin) applicableFieldSpecs(id resid.ResId) []type } func (p *NamespaceTransformerPlugin) changeNamespace( - referrer *resource.Resource) func(in interface{}) (interface{}, error) { + _ *resource.Resource) func(in interface{}) (interface{}, error) { return func(in interface{}) (interface{}, error) { switch in.(type) { case string: diff --git a/api/builtins/PrefixSuffixTransformer.go b/api/builtins/PrefixSuffixTransformer.go index 50ebf5e63..15bb83ce4 100644 --- a/api/builtins/PrefixSuffixTransformer.go +++ b/api/builtins/PrefixSuffixTransformer.go @@ -33,7 +33,7 @@ var prefixSuffixFieldSpecsToSkip = []types.FieldSpec{ } func (p *PrefixSuffixTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Prefix = "" p.Suffix = "" p.FieldSpecs = nil diff --git a/api/builtins/ReplicaCountTransformer.go b/api/builtins/ReplicaCountTransformer.go index 86b1c139c..ad314a5c6 100644 --- a/api/builtins/ReplicaCountTransformer.go +++ b/api/builtins/ReplicaCountTransformer.go @@ -22,8 +22,7 @@ type ReplicaCountTransformerPlugin struct { } func (p *ReplicaCountTransformerPlugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { - + _ *resmap.PluginHelpers, c []byte) (err error) { p.Replica = types.Replica{} p.FieldSpecs = nil return yaml.Unmarshal(c, p) diff --git a/api/internal/crawl/cmd/crawler/crawler.go b/api/internal/crawl/cmd/crawler/crawler.go index 4212d9f19..c8f01be0a 100644 --- a/api/internal/crawl/cmd/crawler/crawler.go +++ b/api/internal/crawl/cmd/crawler/crawler.go @@ -92,7 +92,7 @@ func main() { _, err := idx.Put("", d) return err default: - return fmt.Errorf("Type %T not supported", d) + return fmt.Errorf("type %T not supported", d) } }, ) diff --git a/api/internal/crawl/crawler/crawler_test.go b/api/internal/crawl/crawler/crawler_test.go index d2920e08a..576ba302f 100644 --- a/api/internal/crawl/crawler/crawler_test.go +++ b/api/internal/crawl/crawler/crawler_test.go @@ -11,8 +11,8 @@ import ( "testing" "time" - "sigs.k8s.io/kustomize/api/konfig" "sigs.k8s.io/kustomize/api/internal/crawl/doc" + "sigs.k8s.io/kustomize/api/konfig" ) const ( @@ -32,7 +32,7 @@ func (c testCrawler) Match(d *doc.Document) bool { return d != nil && strings.HasPrefix(d.ID(), c.matchPrefix) } -func (c testCrawler) FetchDocument(ctx context.Context, d *doc.Document) error { +func (c testCrawler) FetchDocument(_ context.Context, d *doc.Document) error { if i, ok := c.lukp[d.ID()]; ok { d.DocumentData = c.docs[i].DocumentData return nil @@ -51,7 +51,7 @@ func (c testCrawler) FetchDocument(ctx context.Context, d *doc.Document) error { d, c.matchPrefix) } -func (c testCrawler) SetCreated(ctx context.Context, d *doc.Document) error { +func (c testCrawler) SetCreated(_ context.Context, d *doc.Document) error { d.CreationTime = &time.Time{} return nil } @@ -71,7 +71,7 @@ func newCrawler(matchPrefix string, err error, } // Crawl implements the Crawler interface for testing. -func (c testCrawler) Crawl(ctx context.Context, +func (c testCrawler) Crawl(_ context.Context, output chan<- CrawledDocument) error { for i, d := range c.docs { diff --git a/api/internal/crawl/crawler/github/crawler.go b/api/internal/crawl/crawler/github/crawler.go index fa26d1404..3bea81f57 100644 --- a/api/internal/crawl/crawler/github/crawler.go +++ b/api/internal/crawl/crawler/github/crawler.go @@ -93,7 +93,7 @@ func (gc githubCrawler) Crawl( return nil } -func (gc githubCrawler) FetchDocument(ctx context.Context, d *doc.Document) error { +func (gc githubCrawler) FetchDocument(_ context.Context, d *doc.Document) error { repoURL := d.RepositoryURL + "/" + d.FilePath + "?ref=" + d.DefaultBranch repoSpec, err := git.NewRepoSpecFromUrl(repoURL) if err != nil { @@ -132,7 +132,7 @@ func (gc githubCrawler) FetchDocument(ctx context.Context, d *doc.Document) erro return fmt.Errorf("file not found: %s, error: %v", url, err) } -func (gc githubCrawler) SetCreated(ctx context.Context, d *doc.Document) error { +func (gc githubCrawler) SetCreated(_ context.Context, d *doc.Document) error { fs := GhFileSpec{} fs.Repository.FullName = d.RepositoryURL + "/" + d.FilePath creationTime, err := gc.client.GetFileCreationTime(fs) diff --git a/api/internal/crawl/crawler/github/queries.go b/api/internal/crawl/crawler/github/queries.go index 4c41b0fa8..7aa4e1531 100644 --- a/api/internal/crawl/crawler/github/queries.go +++ b/api/internal/crawl/crawler/github/queries.go @@ -8,7 +8,6 @@ import ( const ( perPageArg = "per_page" - accessTokenArg = "access_token" ) const githubMaxPageSize = 100 @@ -101,12 +100,6 @@ type RequestConfig struct { perPage uint64 } -func NewRequestConfig(perPage uint64) RequestConfig { - return RequestConfig{ - perPage: perPage, - } -} - // CodeSearchRequestWith given a list of query parameters that specify the // (patial) query, returns a request object with the (parital) query. Must call // the URL method to get the string value of the URL. See request.CopyWith, to diff --git a/api/internal/crawl/crawler/github/queries_test.go b/api/internal/crawl/crawler/github/queries_test.go index db8fe571c..217ee79e8 100644 --- a/api/internal/crawl/crawler/github/queries_test.go +++ b/api/internal/crawl/crawler/github/queries_test.go @@ -68,7 +68,6 @@ func TestQueryType(t *testing.T) { func TestGithubSearchQuery(t *testing.T) { const ( - accessToken = "random_token" perPage = 100 ) diff --git a/api/testutils/kusttest/harness.go b/api/testutils/kusttest/harness.go index 4730bb35b..3fd19305a 100644 --- a/api/testutils/kusttest/harness.go +++ b/api/testutils/kusttest/harness.go @@ -75,7 +75,7 @@ func (th Harness) MakeOptionsPluginsEnabled() krusty.Options { if strings.Contains(err.Error(), "unable to find plugin root") { th.t.Log( "Tests that want to run with plugins enabled must be " + - "bookended by calls to MakeEnhancedHarness(), Reset().") + "bookended by calls to MakeEnhancedHarness(), Reset().") } th.t.Fatal(err) } diff --git a/api/testutils/resmaptest/rmbuilder.go b/api/testutils/resmaptest/rmbuilder.go index dfb231ebd..7c88f1c3c 100644 --- a/api/testutils/resmaptest/rmbuilder.go +++ b/api/testutils/resmaptest/rmbuilder.go @@ -6,7 +6,6 @@ package resmaptest_test import ( "testing" - "sigs.k8s.io/kustomize/api/resid" "sigs.k8s.io/kustomize/api/resmap" "sigs.k8s.io/kustomize/api/resource" ) @@ -38,14 +37,6 @@ func (rm *rmBuilder) AddR(r *resource.Resource) *rmBuilder { return rm } -func (rm *rmBuilder) AddWithId(id resid.ResId, m map[string]interface{}) *rmBuilder { - err := rm.m.Append(rm.rf.FromMap(m)) - if err != nil { - rm.t.Fatalf("test setup failure: %v", err) - } - return rm -} - func (rm *rmBuilder) AddWithName(n string, m map[string]interface{}) *rmBuilder { err := rm.m.Append(rm.rf.FromMapWithName(n, m)) if err != nil { diff --git a/api/testutils/valtest/fakevalidator.go b/api/testutils/valtest/fakevalidator.go index 2cd459fcc..7e7daadfa 100644 --- a/api/testutils/valtest/fakevalidator.go +++ b/api/testutils/valtest/fakevalidator.go @@ -36,12 +36,12 @@ func MakeFakeValidator() *fakeValidator { } // ErrIfInvalidKey returns nil -func (v *fakeValidator) ErrIfInvalidKey(k string) error { +func (v *fakeValidator) ErrIfInvalidKey(_ string) error { return nil } // IsEnvVarName returns nil -func (v *fakeValidator) IsEnvVarName(k string) error { +func (v *fakeValidator) IsEnvVarName(_ string) error { return nil } diff --git a/api/transform/mutatefield_test.go b/api/transform/mutatefield_test.go index 7204f34a9..8fdafc68c 100644 --- a/api/transform/mutatefield_test.go +++ b/api/transform/mutatefield_test.go @@ -22,7 +22,7 @@ var errExpected = fmt.Errorf("oops") const originalValue = "tomato" const newValue = "notThe" + originalValue -func (m *noopMutator) mutate(in interface{}) (interface{}, error) { +func (m *noopMutator) mutate(_ interface{}) (interface{}, error) { m.wasCalled = true return newValue, m.errorToReturn } diff --git a/kustomize/internal/commands/edit/add/addbase.go b/kustomize/internal/commands/edit/add/addbase.go index 65f2a5f4e..096d90ee9 100644 --- a/kustomize/internal/commands/edit/add/addbase.go +++ b/kustomize/internal/commands/edit/add/addbase.go @@ -31,10 +31,6 @@ func newCmdAddBase(fSys filesys.FileSystem) *cobra.Command { if err != nil { return err } - err = o.Complete(cmd, args) - if err != nil { - return err - } return o.RunAddBase(fSys) }, } @@ -50,11 +46,6 @@ func (o *addBaseOptions) Validate(args []string) error { return nil } -// Complete completes addBase command. -func (o *addBaseOptions) Complete(cmd *cobra.Command, args []string) error { - return nil -} - // RunAddBase runs addBase command (do real work). func (o *addBaseOptions) RunAddBase(fSys filesys.FileSystem) error { mf, err := kustfile.NewKustomizationFile(fSys) diff --git a/kustomize/internal/commands/edit/add/addpatch.go b/kustomize/internal/commands/edit/add/addpatch.go index c72f225c0..5a53df6e9 100644 --- a/kustomize/internal/commands/edit/add/addpatch.go +++ b/kustomize/internal/commands/edit/add/addpatch.go @@ -32,10 +32,6 @@ func newCmdAddPatch(fSys filesys.FileSystem) *cobra.Command { if err != nil { return err } - err = o.Complete(cmd, args) - if err != nil { - return err - } return o.RunAddPatch(fSys) }, } @@ -51,11 +47,6 @@ func (o *addPatchOptions) Validate(args []string) error { return nil } -// Complete completes addPatch command. -func (o *addPatchOptions) Complete(cmd *cobra.Command, args []string) error { - return nil -} - // RunAddPatch runs addPatch command (do real work). func (o *addPatchOptions) RunAddPatch(fSys filesys.FileSystem) error { patches, err := util.GlobPatterns(fSys, o.patchFilePaths) diff --git a/kustomize/internal/commands/edit/add/addresource.go b/kustomize/internal/commands/edit/add/addresource.go index a47d3a572..7f05a6421 100644 --- a/kustomize/internal/commands/edit/add/addresource.go +++ b/kustomize/internal/commands/edit/add/addresource.go @@ -31,10 +31,6 @@ func newCmdAddResource(fSys filesys.FileSystem) *cobra.Command { if err != nil { return err } - err = o.Complete(cmd, args) - if err != nil { - return err - } return o.RunAddResource(fSys) }, } @@ -50,11 +46,6 @@ func (o *addResourceOptions) Validate(args []string) error { return nil } -// Complete completes addResource command. -func (o *addResourceOptions) Complete(cmd *cobra.Command, args []string) error { - return nil -} - // RunAddResource runs addResource command (do real work). func (o *addResourceOptions) RunAddResource(fSys filesys.FileSystem) error { resources, err := util.GlobPatterns(fSys, o.resourceFilePaths) diff --git a/kustomize/internal/commands/edit/remove/removepatch.go b/kustomize/internal/commands/edit/remove/removepatch.go index 012f7f911..e1e0762fe 100644 --- a/kustomize/internal/commands/edit/remove/removepatch.go +++ b/kustomize/internal/commands/edit/remove/removepatch.go @@ -34,10 +34,6 @@ func newCmdRemovePatch(fSys filesys.FileSystem) *cobra.Command { if err != nil { return err } - err = o.Complete(cmd, args) - if err != nil { - return err - } return o.RunRemovePatch(fSys) }, } @@ -53,11 +49,6 @@ func (o *removePatchOptions) Validate(args []string) error { return nil } -// Complete completes removePatch command. -func (o *removePatchOptions) Complete(cmd *cobra.Command, args []string) error { - return nil -} - // RunRemovePatch runs removePatch command (do real work). func (o *removePatchOptions) RunRemovePatch(fSys filesys.FileSystem) error { patches, err := util.GlobPatterns(fSys, o.patchFilePaths) diff --git a/kustomize/internal/commands/edit/remove/removeresource.go b/kustomize/internal/commands/edit/remove/removeresource.go index 5f02f62da..178de5bd4 100644 --- a/kustomize/internal/commands/edit/remove/removeresource.go +++ b/kustomize/internal/commands/edit/remove/removeresource.go @@ -35,10 +35,6 @@ func newCmdRemoveResource(fSys filesys.FileSystem) *cobra.Command { if err != nil { return err } - err = o.Complete(cmd, args) - if err != nil { - return err - } return o.RunRemoveResource(fSys) }, } @@ -54,11 +50,6 @@ func (o *removeResourceOptions) Validate(args []string) error { return nil } -// Complete completes removeResource command. -func (o *removeResourceOptions) Complete(cmd *cobra.Command, args []string) error { - return nil -} - // RunRemoveResource runs Resource command (do real work). func (o *removeResourceOptions) RunRemoveResource(fSys filesys.FileSystem) error { diff --git a/kustomize/internal/commands/edit/set/set_name_prefix.go b/kustomize/internal/commands/edit/set/set_name_prefix.go index b8aadb688..3601db912 100644 --- a/kustomize/internal/commands/edit/set/set_name_prefix.go +++ b/kustomize/internal/commands/edit/set/set_name_prefix.go @@ -33,10 +33,6 @@ and overwrite the value with "acme-" if the field does exist. if err != nil { return err } - err = o.Complete(cmd, args) - if err != nil { - return err - } return o.RunSetNamePrefix(fSys) }, } @@ -53,11 +49,6 @@ func (o *setNamePrefixOptions) Validate(args []string) error { return nil } -// Complete completes setNamePrefix command. -func (o *setNamePrefixOptions) Complete(cmd *cobra.Command, args []string) error { - return nil -} - // RunSetNamePrefix runs setNamePrefix command (does real work). func (o *setNamePrefixOptions) RunSetNamePrefix(fSys filesys.FileSystem) error { mf, err := kustfile.NewKustomizationFile(fSys) diff --git a/kustomize/internal/commands/edit/set/set_name_suffix.go b/kustomize/internal/commands/edit/set/set_name_suffix.go index ec6d4a230..a6ce4548f 100644 --- a/kustomize/internal/commands/edit/set/set_name_suffix.go +++ b/kustomize/internal/commands/edit/set/set_name_suffix.go @@ -33,10 +33,6 @@ and overwrite the value with "-acme" if the field does exist. if err != nil { return err } - err = o.Complete(cmd, args) - if err != nil { - return err - } return o.RunSetNameSuffix(fSys) }, } @@ -53,11 +49,6 @@ func (o *setNameSuffixOptions) Validate(args []string) error { return nil } -// Complete completes setNameSuffix command. -func (o *setNameSuffixOptions) Complete(cmd *cobra.Command, args []string) error { - return nil -} - // RunSetNameSuffix runs setNameSuffix command (does real work). func (o *setNameSuffixOptions) RunSetNameSuffix(fSys filesys.FileSystem) error { mf, err := kustfile.NewKustomizationFile(fSys) diff --git a/kustomize/internal/commands/version/version.go b/kustomize/internal/commands/version/version.go index d0f5384cf..dac2aa827 100644 --- a/kustomize/internal/commands/version/version.go +++ b/kustomize/internal/commands/version/version.go @@ -21,9 +21,9 @@ func NewCmdVersion(w io.Writer) *cobra.Command { Example: `kustomize version`, Run: func(cmd *cobra.Command, args []string) { if short { - fmt.Println(provenance.GetProvenance().Short()) + fmt.Fprintln(w, provenance.GetProvenance().Short()) } else { - fmt.Println(provenance.GetProvenance().Full()) + fmt.Fprintln(w, provenance.GetProvenance().Full()) } }, } diff --git a/plugin/builtin/annotationstransformer/AnnotationsTransformer.go b/plugin/builtin/annotationstransformer/AnnotationsTransformer.go index 70f504dbe..1f0c6d095 100644 --- a/plugin/builtin/annotationstransformer/AnnotationsTransformer.go +++ b/plugin/builtin/annotationstransformer/AnnotationsTransformer.go @@ -21,7 +21,7 @@ type plugin struct { var KustomizePlugin plugin func (p *plugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Annotations = nil p.FieldSpecs = nil return yaml.Unmarshal(c, p) diff --git a/plugin/builtin/hashtransformer/HashTransformer.go b/plugin/builtin/hashtransformer/HashTransformer.go index 6a592a1cc..eb7b6618b 100644 --- a/plugin/builtin/hashtransformer/HashTransformer.go +++ b/plugin/builtin/hashtransformer/HashTransformer.go @@ -19,7 +19,7 @@ type plugin struct { var KustomizePlugin plugin func (p *plugin) Config( - h *resmap.PluginHelpers, config []byte) (err error) { + h *resmap.PluginHelpers, _ []byte) (err error) { p.hasher = h.ResmapFactory().RF().Hasher() return nil } diff --git a/plugin/builtin/imagetagtransformer/ImageTagTransformer.go b/plugin/builtin/imagetagtransformer/ImageTagTransformer.go index ccf2482a6..2b1b347b6 100644 --- a/plugin/builtin/imagetagtransformer/ImageTagTransformer.go +++ b/plugin/builtin/imagetagtransformer/ImageTagTransformer.go @@ -27,7 +27,7 @@ type plugin struct { var KustomizePlugin plugin func (p *plugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.ImageTag = types.Image{} p.FieldSpecs = nil return yaml.Unmarshal(c, p) diff --git a/plugin/builtin/labeltransformer/LabelTransformer.go b/plugin/builtin/labeltransformer/LabelTransformer.go index 506c5b4af..df852c497 100644 --- a/plugin/builtin/labeltransformer/LabelTransformer.go +++ b/plugin/builtin/labeltransformer/LabelTransformer.go @@ -21,7 +21,7 @@ type plugin struct { var KustomizePlugin plugin func (p *plugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Labels = nil p.FieldSpecs = nil return yaml.Unmarshal(c, p) diff --git a/plugin/builtin/legacyordertransformer/LegacyOrderTransformer.go b/plugin/builtin/legacyordertransformer/LegacyOrderTransformer.go index d7d141f87..ea7b8cbbc 100644 --- a/plugin/builtin/legacyordertransformer/LegacyOrderTransformer.go +++ b/plugin/builtin/legacyordertransformer/LegacyOrderTransformer.go @@ -24,7 +24,7 @@ var KustomizePlugin plugin // Nothing needed for configuration. func (p *plugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, _ []byte) (err error) { return nil } diff --git a/plugin/builtin/namespacetransformer/NamespaceTransformer.go b/plugin/builtin/namespacetransformer/NamespaceTransformer.go index b0a645d60..b8e33f9d1 100644 --- a/plugin/builtin/namespacetransformer/NamespaceTransformer.go +++ b/plugin/builtin/namespacetransformer/NamespaceTransformer.go @@ -26,7 +26,7 @@ type plugin struct { var KustomizePlugin plugin func (p *plugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Namespace = "" p.FieldSpecs = nil return yaml.Unmarshal(c, p) @@ -79,7 +79,7 @@ func (p *plugin) applicableFieldSpecs(id resid.ResId) []types.FieldSpec { } func (p *plugin) changeNamespace( - referrer *resource.Resource) func(in interface{}) (interface{}, error) { + _ *resource.Resource) func(in interface{}) (interface{}, error) { return func(in interface{}) (interface{}, error) { switch in.(type) { case string: diff --git a/plugin/builtin/prefixsuffixtransformer/PrefixSuffixTransformer.go b/plugin/builtin/prefixsuffixtransformer/PrefixSuffixTransformer.go index cb3a360e2..4d457d4ed 100644 --- a/plugin/builtin/prefixsuffixtransformer/PrefixSuffixTransformer.go +++ b/plugin/builtin/prefixsuffixtransformer/PrefixSuffixTransformer.go @@ -37,7 +37,7 @@ var prefixSuffixFieldSpecsToSkip = []types.FieldSpec{ } func (p *plugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { + _ *resmap.PluginHelpers, c []byte) (err error) { p.Prefix = "" p.Suffix = "" p.FieldSpecs = nil diff --git a/plugin/builtin/replicacounttransformer/ReplicaCountTransformer.go b/plugin/builtin/replicacounttransformer/ReplicaCountTransformer.go index b496e6656..208a996ea 100644 --- a/plugin/builtin/replicacounttransformer/ReplicaCountTransformer.go +++ b/plugin/builtin/replicacounttransformer/ReplicaCountTransformer.go @@ -26,8 +26,7 @@ type plugin struct { var KustomizePlugin plugin func (p *plugin) Config( - h *resmap.PluginHelpers, c []byte) (err error) { - + _ *resmap.PluginHelpers, c []byte) (err error) { p.Replica = types.Replica{} p.FieldSpecs = nil return yaml.Unmarshal(c, p)