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

Commit 9b89d5f

Browse files
committed
Removes vendor in favour of using pure go mod
Signed-off-by: JoshVanL <[email protected]>
1 parent c86413d commit 9b89d5f

File tree

3,389 files changed

+9
-999518
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
-999518
lines changed

Makefile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ endif
2626

2727
$(BINDIR)/mockgen:
2828
mkdir -p $(BINDIR)
29-
go build -o $(BINDIR)/mockgen ./vendor/github.com/golang/mock/mockgen
29+
GO111MODULE=on go build -o $(BINDIR)/mockgen github.com/golang/mock/mockgen
3030

3131
$(BINDIR)/kubectl:
3232
mkdir -p $(BINDIR)
@@ -48,34 +48,31 @@ depend: $(BINDIR)/mockgen $(BINDIR)/kubectl $(BINDIR)/golangci-lint
4848
verify_boilerplate:
4949
$(HACK_DIR)/verify-boilerplate.sh
5050

51-
verify_vendor:
51+
verify_mod:
5252
go mod verify
5353

5454
go_fmt:
5555
@set -e; \
56-
GO_FMT=$$(git ls-files *.go | grep -v 'vendor/' | xargs gofmt -d); \
56+
GO_FMT=$$(git ls-files *.go | xargs gofmt -d); \
5757
if [ -n "$${GO_FMT}" ] ; then \
5858
echo "Please run go fmt"; \
5959
echo "$$GO_FMT"; \
6060
exit 1; \
6161
fi
6262

6363
go_vet:
64-
go vet $$(go list ./pkg/... ./cmd/...)
64+
go vet
6565

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.
6966
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
67+
$(BINDIR)/golangci-lint run
7168

7269
clean: ## clean up created files
7370
rm -rf \
7471
$(BINDIR) \
7572
kube-oidc-proxy \
7673
pkg/mocks/authenticator.go
7774

78-
verify: verify_boilerplate verify_vendor go_fmt go_vet go_lint ## verify code and vendor
75+
verify: depend verify_boilerplate verify_mod go_fmt go_vet go_lint ## verify code and mod
7976

8077
generate: depend ## generates mocks and assets files
8178
go generate $$(go list ./pkg/... ./cmd/...)
@@ -101,7 +98,7 @@ e2e-1.11: build ## run end to end tests for kubernetes version 1.11
10198
KUBE_OIDC_PROXY_NODE_IMAGE=1.11.10 go test ./pkg/e2e/. -v --count=1
10299

103100
build: generate ## build kube-oidc-proxy
104-
CGO_ENABLED=0 go build -ldflags '-w $(shell hack/version-ldflags.sh)'
101+
GO111MODULE=on CGO_ENABLED=0 go build -ldflags '-w $(shell hack/version-ldflags.sh)'
105102

106103
docker_build: generate test build ## build docker image
107104
docker build -t kube-oidc-proxy .

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)