Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 8c93022

Browse files
authored
Merge pull request #85 from JoshVanL/remove-vendor
Removes vendor in favour of using pure go mod
2 parents c86413d + 42d0e51 commit 8c93022

File tree

3,389 files changed

+9
-999519
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,389 files changed

+9
-999519
lines changed

Makefile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ BINDIR ?= $(CURDIR)/bin
33
HACK_DIR ?= hack
44
PATH := $(BINDIR):$(PATH)
55

6+
export GO111MODULE=on
7+
68
help: ## display this help
79
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-20s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
810

@@ -26,7 +28,7 @@ endif
2628

2729
$(BINDIR)/mockgen:
2830
mkdir -p $(BINDIR)
29-
go build -o $(BINDIR)/mockgen ./vendor/github.com/golang/mock/mockgen
31+
go build -o $(BINDIR)/mockgen github.com/golang/mock/mockgen
3032

3133
$(BINDIR)/kubectl:
3234
mkdir -p $(BINDIR)
@@ -48,34 +50,28 @@ depend: $(BINDIR)/mockgen $(BINDIR)/kubectl $(BINDIR)/golangci-lint
4850
verify_boilerplate:
4951
$(HACK_DIR)/verify-boilerplate.sh
5052

51-
verify_vendor:
52-
go mod verify
53-
5453
go_fmt:
5554
@set -e; \
56-
GO_FMT=$$(git ls-files *.go | grep -v 'vendor/' | xargs gofmt -d); \
55+
GO_FMT=$$(git ls-files *.go | xargs gofmt -d); \
5756
if [ -n "$${GO_FMT}" ] ; then \
5857
echo "Please run go fmt"; \
5958
echo "$$GO_FMT"; \
6059
exit 1; \
6160
fi
6261

6362
go_vet:
64-
go vet $$(go list ./pkg/... ./cmd/...)
63+
go vet
6564

66-
# We vendor packages using ./hack/tools with go modules for building binaries.
67-
# These files will fail linting since they use '_' importing with no usage so
68-
# must be ommited.
6965
go_lint: $(BINDIR)/golangci-lint ## lint golang code for problems
70-
go list -f '{{.Dir}}' ./... | fgrep -v hack/tools | xargs realpath --relative-to=. | xargs $(BINDIR)/golangci-lint run
66+
$(BINDIR)/golangci-lint run
7167

7268
clean: ## clean up created files
7369
rm -rf \
7470
$(BINDIR) \
7571
kube-oidc-proxy \
7672
pkg/mocks/authenticator.go
7773

78-
verify: verify_boilerplate verify_vendor go_fmt go_vet go_lint ## verify code and vendor
74+
verify: depend verify_boilerplate go_fmt go_vet go_lint ## verify code and mod
7975

8076
generate: depend ## generates mocks and assets files
8177
go generate $$(go list ./pkg/... ./cmd/...)

hack/tools/tools.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
// +build tools
2+
13
// Copyright Jetstack Ltd. See LICENSE for details.
24
package tools
35

46
// This file is used to vendor packages we use to build binaries.
57
// This is the current canonical way with go modules.
68

7-
//+build tools
8-
99
import (
1010
_ "github.com/golang/mock/mockgen"
1111
)

vendor/cloud.google.com/go/AUTHORS

Lines changed: 0 additions & 15 deletions
This file was deleted.

vendor/cloud.google.com/go/CONTRIBUTORS

Lines changed: 0 additions & 40 deletions
This file was deleted.

vendor/cloud.google.com/go/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)