mod+tools+Makefile: use go install to fetch dependencies

Instead of hard coding a commit to use for a binary tool that we use
during the build process, we now only use "go install" to install the
binaries and the golang builtin versioning system to pin the exact
version/commit we want to use in go.mod.
This commit is contained in:
Oliver Gugger
2021-11-29 13:11:04 +01:00
parent 44266f3889
commit 43158b6b59
4 changed files with 242 additions and 30 deletions

View File

@@ -11,4 +11,15 @@ import (
// github.com/btcsuite/winsvc is kept in the go.sum file. Because of the
// build tag, this dependency never ends up in the final lnd binary.
_ "github.com/btcsuite/btcd"
// Instead of defining a commit we want to use for those golang based
// tools, we use the go mod versioning system to unify the way we manage
// dependencies. So we define our build tool dependencies here and pin
// the version in go.mod.
_ "github.com/dvyukov/go-fuzz/go-fuzz"
_ "github.com/dvyukov/go-fuzz/go-fuzz-build"
_ "github.com/dvyukov/go-fuzz/go-fuzz-dep"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/ory/go-acc"
_ "golang.org/x/tools/cmd/goimports"
)