From 08b6f6f4e4008f83c9b2f519dc394a1a278a5b80 Mon Sep 17 00:00:00 2001 From: jregan Date: Wed, 12 Jun 2019 19:52:04 -0700 Subject: [PATCH] Update golinter to 1.17.1 --- .travis.yml | 5 +---- k8sdeps/kunstruct/hasher_test.go | 3 --- plugin/someteam.example.com/v1/dateprefixer/DatePrefixer.go | 2 +- .../v1/someservicegenerator/SomeServiceGenerator.go | 2 +- 4 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index 656650745..1fa62963a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,12 +23,9 @@ go: go_import_path: sigs.k8s.io/kustomize -env: - - GOLANGCI_RELEASE="v1.12" - before_install: - source ./travis/consider-early-travis-exit.sh - - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin ${GOLANGCI_RELEASE} + - curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.17.1 - go get -u github.com/monopole/mdrip # The following would install Helm if needed for some reason. # - wget https://storage.googleapis.com/kubernetes-helm/helm-v2.13.1-linux-amd64.tar.gz diff --git a/k8sdeps/kunstruct/hasher_test.go b/k8sdeps/kunstruct/hasher_test.go index e0981bfca..aea27c399 100644 --- a/k8sdeps/kunstruct/hasher_test.go +++ b/k8sdeps/kunstruct/hasher_test.go @@ -12,10 +12,7 @@ import ( "sigs.k8s.io/kustomize/pkg/gvk" ) -var service = gvk.Gvk{Version: "v1", Kind: "Service"} var secret = gvk.Gvk{Version: "v1", Kind: "Secret"} -var cmap = gvk.Gvk{Version: "v1", Kind: "ConfigMap"} -var deploy = gvk.Gvk{Group: "apps", Version: "v1", Kind: "Deployment"} func TestConfigMapHash(t *testing.T) { cases := []struct { diff --git a/plugin/someteam.example.com/v1/dateprefixer/DatePrefixer.go b/plugin/someteam.example.com/v1/dateprefixer/DatePrefixer.go index 2f46d5f92..62348811c 100644 --- a/plugin/someteam.example.com/v1/dateprefixer/DatePrefixer.go +++ b/plugin/someteam.example.com/v1/dateprefixer/DatePrefixer.go @@ -35,7 +35,7 @@ func (p *plugin) makePrefixSuffixPluginConfig() ([]byte, error) { } func (p *plugin) Config( - ldr ifc.Loader, rf *resmap.Factory, c []byte) error { + ldr ifc.Loader, rf *resmap.Factory, _ []byte) error { // Ignore the incoming c, compute new config. c, err := p.makePrefixSuffixPluginConfig() if err != nil { diff --git a/plugin/someteam.example.com/v1/someservicegenerator/SomeServiceGenerator.go b/plugin/someteam.example.com/v1/someservicegenerator/SomeServiceGenerator.go index 1104887e9..221c4db3d 100644 --- a/plugin/someteam.example.com/v1/someservicegenerator/SomeServiceGenerator.go +++ b/plugin/someteam.example.com/v1/someservicegenerator/SomeServiceGenerator.go @@ -36,7 +36,7 @@ spec: ` func (p *plugin) Config( - ldr ifc.Loader, rf *resmap.Factory, config []byte) error { + _ ifc.Loader, rf *resmap.Factory, config []byte) error { p.rf = rf return yaml.Unmarshal(config, p) }