Skip to content

Commit

Permalink
keep goimports under vendor/
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Horacek <phoracek@redhat.com>
  • Loading branch information
phoracek committed Jun 3, 2019
1 parent 412e013 commit 8c2db6e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Expand Up @@ -4,8 +4,6 @@ go: "1.11"
services:
- docker

before_install:
- go get golang.org/x/tools/cmd/goimports
install: true
script:
- make check
Expand Down
4 changes: 3 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Gopkg.toml
Expand Up @@ -10,6 +10,7 @@ required = [
"k8s.io/gengo/args",
"sigs.k8s.io/controller-tools/pkg/crd/generator",
"github.com/operator-framework/operator-sdk/cmd/operator-sdk",
"golang.org/x/tools/cmd/goimports",
]

# https://github.com/golang/dep/issues/1799
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -19,7 +19,7 @@ apis_sources := $(shell find ./pkg/apis/ -type f -name '*.go')
fmt: whitespace goimports

goimports: $(cmd_sources) $(pkg_sources)
goimports -w ./pkg ./cmd
go run ./vendor/golang.org/x/tools/cmd/goimports -w ./pkg ./cmd
touch $@

whitespace: $(cmd_sources) $(pkg_sources)
Expand All @@ -37,7 +37,7 @@ vet: $(cmd_sources) $(pkg_sources)
touch $@

goimports-check: $(cmd_sources) $(pkg_sources)
goimports -d ./pkg ./cmd
go run ./vendor/golang.org/x/tools/cmd/goimports -d ./pkg ./cmd
touch $@

test:
Expand Down

0 comments on commit 8c2db6e

Please sign in to comment.