Without the fix, building can complain like this:
> # golang.org/x/sys/unix
> vendor/golang.org/x/sys/unix/syscall.go:83:16: unsafe.Slice requires go1.17 or later (-lang was set to go1.16; check go.mod)
Fixes: a3204cf7e8
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Remove some old time artifacts, such as:
- GO111MODULES, GO_PROXY, and MOD_VENDOR (no longer needed since go 1.14);
- GIT_BRANCH (not needed since 2016, commit d855327b5e);
- EPOCH_TEST_COMMIT (not needed since 2017, commit 230b9ab91a);
except that -mod=vendor is needed for go build in tests/tools.
Also remove:
- PROJECT_ROOT (and use of "go list" for tests);
- sources (go build is efficient so we can use it every time without
using make to compare sources timestamps).
This makes makefiles less cluttered, and should also fix the following
golangci-lint error observed in CI:
> running gomoddirectives failed: failed to get module file: command
> go list: exit status 1: go: list -m cannot be used with GO111MODULE=off:
> if you are not using go modules it is suggested to disable this linter"
As a result, golangci-lint was effectively disabled.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Run `go fmt ./...` which automatically adds the new build tag syntax.
This change is backwards compatible.
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Looks like go.mod and go.sum contain a lot of cruft
accumulated over time, like indirect dependencies
or packages that were removed later.
This patch is a result of running `go mod tidy`
(from go-1.13.6) in root and `tests/tools` directories.
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
It is an upstream recommendation to not vendor golangci-lint and use the
pre-built binary instead. This means we now remove it from the vendored
sources and update the config as well.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit uses internal tools vendoring to switch to golangci-lint. All
working linters have been enabled. The other tools have been vendored as
well into the same tools folder, whereas the corresponding test and
build targets have been adapted as well.
Signed-off-by: Sascha Grunert <sgrunert@suse.com>