Makefile: consistently use go install instead of go get for installing various binaries needed during build/test/check of the code

`go install` is the preferred way for installing go binaries starting
from the minimum supported Go version for VictoriaMetrics - Go1.18 -
see https://tip.golang.org/doc/go1.18#go-command
This commit is contained in:
Aliaksandr Valialkin 2022-09-08 18:43:02 +03:00
parent e29c9dea30
commit 6cbe85a08a
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -148,7 +148,7 @@ lint: install-golint
golint app/... golint app/...
install-golint: install-golint:
which golint || GO111MODULE=off go get golang.org/x/lint/golint which golint || go install golang.org/x/lint/golint@latest
errcheck: install-errcheck errcheck: install-errcheck
errcheck -exclude=errcheck_excludes.txt ./lib/... errcheck -exclude=errcheck_excludes.txt ./lib/...
@ -163,7 +163,7 @@ errcheck: install-errcheck
errcheck -exclude=errcheck_excludes.txt ./app/vmctl/... errcheck -exclude=errcheck_excludes.txt ./app/vmctl/...
install-errcheck: install-errcheck:
which errcheck || GO111MODULE=off go get github.com/kisielk/errcheck which errcheck || go install github.com/kisielk/errcheck@latest
check-all: fmt vet lint errcheck golangci-lint govulncheck check-all: fmt vet lint errcheck golangci-lint govulncheck
@ -212,7 +212,7 @@ quicktemplate-gen: install-qtc
qtc qtc
install-qtc: install-qtc:
which qtc || GO111MODULE=off go get github.com/valyala/quicktemplate/qtc which qtc || go install github.com/valyala/quicktemplate/qtc@latest
golangci-lint: install-golangci-lint golangci-lint: install-golangci-lint
@ -228,7 +228,7 @@ install-govulncheck:
which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest which govulncheck || go install golang.org/x/vuln/cmd/govulncheck@latest
install-wwhrd: install-wwhrd:
which wwhrd || GO111MODULE=off go get github.com/frapposelli/wwhrd which wwhrd || go install github.com/frapposelli/wwhrd@latest
check-licenses: install-wwhrd check-licenses: install-wwhrd
wwhrd check -f .wwhrd.yml wwhrd check -f .wwhrd.yml