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 28b6dec1f4
commit aa0c6ed27f
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -321,7 +321,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/...
@ -336,7 +336,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
@ -385,7 +385,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
@ -401,7 +401,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