modules: Add config option modules.vendorClosest

Fixes #8235
Fixes #8242
This commit is contained in:
Bjørn Erik Pedersen
2021-02-14 19:24:13 +01:00
parent b60e9279ab
commit bdfbcf6f4b
5 changed files with 64 additions and 9 deletions

View File

@@ -279,6 +279,13 @@ type Config struct {
// "github.com/**".
NoVendor string
// When enabled, we will pick the vendored module closest to the module
// using it.
// The default behaviour is to pick the first.
// Note that there can still be only one dependency of a given module path,
// so once it is in use it cannot be redefined.
VendorClosest bool
Replacements []string
replacementsMap map[string]string