disable cgo when use command "make vet"

Signed-off-by: 24sama <jacksama@foxmail.com>
This commit is contained in:
24sama 2022-04-02 16:11:09 +08:00
parent 5b6fadd4ef
commit a6ceedd470

View File

@ -90,7 +90,7 @@ fmt: ## Run go fmt against code.
go fmt ./...
vet: ## Run go vet against code.
go vet $(BUILDFLAGS) ./...
GOOS=$(GOOS) GOARCH=$(GOARCH) CGO_ENABLED=0 go vet $(BUILDFLAGS) ./...
test: manifests generate fmt vet envtest ## Run tests.
KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out