Skip to content

Commit

Permalink
Bump client-go, go and golangci-lint
Browse files Browse the repository at this point in the history
To the latest/current versions.
  • Loading branch information
bpineau committed Dec 15, 2019
1 parent 3214ef1 commit 4765592
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 61 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: go
go:
- "1.12.x"
- "1.13.x"

# needed for e2e tests (so we can start minikube)
sudo: required
Expand Down Expand Up @@ -34,9 +34,9 @@ install:
- make tools

script:
- make install
- make lint
- make test
- make coverall
- make install
- make e2e

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.12 as builder
FROM golang:1.13 as builder
WORKDIR /go/src/github.com/bpineau/katafygio
COPY . .
RUN make build
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GOLANGCI_VERSION="1.12.5"
GOLANGCI_VERSION=1.21.0
export GO111MODULE := on

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

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

man:
go run assets/manpage.go
Expand Down
2 changes: 1 addition & 1 deletion cmd/execute.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func runE(cmd *cobra.Command, args []string) (err error) {

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

http := health.New(logger, healthP).Start()
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/bpineau/katafygio

go 1.12
go 1.13

require (
github.com/ghodss/yaml v1.0.0
github.com/sirupsen/logrus v1.4.2
github.com/spf13/afero v1.2.2
github.com/spf13/cobra v0.0.5
github.com/spf13/viper v1.4.0
k8s.io/api v0.0.0-20190620084959-7cf5895f2711
k8s.io/apimachinery v0.0.0-20190612205821-1799e75a0719
k8s.io/client-go v0.0.0-20190620085101-78d2af792bab
k8s.io/klog v0.3.1
k8s.io/api v0.17.0
k8s.io/apimachinery v0.17.0
k8s.io/client-go v0.17.0
k8s.io/klog v1.0.0
)
175 changes: 128 additions & 47 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (c *Controller) Start() {
go c.informer.Run(c.stopCh)

if !cache.WaitForCacheSync(c.stopCh, c.informer.HasSynced) {
utilruntime.HandleError(fmt.Errorf("Timed out waiting for cache sync"))
utilruntime.HandleError(fmt.Errorf("timed out waiting for cache sync"))
return
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/store/git/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (s *Store) CloneOrInit() (err error) {
}

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

Expand Down

0 comments on commit 4765592

Please sign in to comment.