Skip to content

Commit 4765592

Browse files
committed
Bump client-go, go and golangci-lint
To the latest/current versions.
1 parent 3214ef1 commit 4765592

File tree

8 files changed

+142
-61
lines changed

8 files changed

+142
-61
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: go
22
go:
3-
- "1.12.x"
3+
- "1.13.x"
44

55
# needed for e2e tests (so we can start minikube)
66
sudo: required
@@ -34,9 +34,9 @@ install:
3434
- make tools
3535

3636
script:
37+
- make install
3738
- make lint
3839
- make test
3940
- make coverall
40-
- make install
4141
- make e2e
4242

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.12 as builder
1+
FROM golang:1.13 as builder
22
WORKDIR /go/src/github.com/bpineau/katafygio
33
COPY . .
44
RUN make build

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
GOLANGCI_VERSION="1.12.5"
1+
GOLANGCI_VERSION=1.21.0
22
export GO111MODULE := on
33

44
all: build
@@ -13,8 +13,8 @@ tools:
1313
which goveralls || go get github.com/mattn/goveralls
1414

1515
lint:
16-
@# vet, errcheck, deadcode, etc are already enabled by default; here we just add more checks:
17-
golangci-lint run -E gofmt,golint,unconvert,dupl,goimports,misspell,maligned
16+
@# govet, errcheck etc are already on by default. this -E enable extra linters:
17+
golangci-lint run -E gofmt,golint,unconvert,dupl,goimports,misspell,maligned,stylecheck
1818

1919
man:
2020
go run assets/manpage.go

cmd/execute.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ func runE(cmd *cobra.Command, args []string) (err error) {
5555

5656
err = appFs.MkdirAll(filepath.Clean(localDir), 0700)
5757
if err != nil {
58-
return fmt.Errorf("Can't create directory %s: %v", localDir, err)
58+
return fmt.Errorf("can't create directory %s: %v", localDir, err)
5959
}
6060

6161
http := health.New(logger, healthP).Start()

go.mod

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
module github.com/bpineau/katafygio
22

3-
go 1.12
3+
go 1.13
44

55
require (
66
github.com/ghodss/yaml v1.0.0
77
github.com/sirupsen/logrus v1.4.2
88
github.com/spf13/afero v1.2.2
99
github.com/spf13/cobra v0.0.5
1010
github.com/spf13/viper v1.4.0
11-
k8s.io/api v0.0.0-20190620084959-7cf5895f2711
12-
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719
13-
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab
14-
k8s.io/klog v0.3.1
11+
k8s.io/api v0.17.0
12+
k8s.io/apimachinery v0.17.0
13+
k8s.io/client-go v0.17.0
14+
k8s.io/klog v1.0.0
1515
)

go.sum

+128-47
Large diffs are not rendered by default.

pkg/controller/controller.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (c *Controller) Start() {
135135
go c.informer.Run(c.stopCh)
136136

137137
if !cache.WaitForCacheSync(c.stopCh, c.informer.HasSynced) {
138-
utilruntime.HandleError(fmt.Errorf("Timed out waiting for cache sync"))
138+
utilruntime.HandleError(fmt.Errorf("timed out waiting for cache sync"))
139139
return
140140
}
141141

pkg/store/git/git.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ func (s *Store) CloneOrInit() (err error) {
164164
}
165165

166166
// One may both sync with a remote repos and keep a persistent local clone
167-
if _, err := os.Stat(fmt.Sprintf("%s/.git/index", s.LocalDir)); err == nil {
167+
if _, err = os.Stat(fmt.Sprintf("%s/.git/index", s.LocalDir)); err == nil {
168168
return nil
169169
}
170170

0 commit comments

Comments
 (0)