diff options
author | Daniel Martí <mvdan@mvdan.cc> | 2019-10-27 12:03:17 +0000 |
---|---|---|
committer | Daniel Martí <mvdan@mvdan.cc> | 2019-10-28 18:46:55 +0000 |
commit | 1c38ee5ffe223ebe1bc82404eddb111f5b5dbd8d (patch) | |
tree | 1dcaa989f6cb507005f0ffe471d3de3687d3f619 /src/cmd/go/internal/load/pkg.go | |
parent | 91f3997ec09d6502f88471f384aad2fe3ddcecb9 (diff) | |
download | go-1c38ee5ffe223ebe1bc82404eddb111f5b5dbd8d.tar.gz go-1c38ee5ffe223ebe1bc82404eddb111f5b5dbd8d.zip |
cmd: remove a few unused parameters
They all seem pretty low-risk, and the overall diff is small.
While at it, remove one in go/build too.
Change-Id: I31df52c1c97d843b06f6c1dc63462d390db4470d
Reviewed-on: https://go-review.googlesource.com/c/go/+/203607
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/load/pkg.go')
-rw-r--r-- | src/cmd/go/internal/load/pkg.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/cmd/go/internal/load/pkg.go b/src/cmd/go/internal/load/pkg.go index 6b8ecc46b1..6a6f77e367 100644 --- a/src/cmd/go/internal/load/pkg.go +++ b/src/cmd/go/internal/load/pkg.go @@ -593,7 +593,7 @@ func loadImport(pre *preload, path, srcDir string, parent *Package, stk *ImportS return setErrorPos(perr, importPos) } if mode&ResolveImport != 0 { - if perr := disallowVendor(srcDir, parent, parentPath, path, p, stk); perr != p { + if perr := disallowVendor(srcDir, path, p, stk); perr != p { return setErrorPos(perr, importPos) } } @@ -1321,11 +1321,10 @@ func findInternal(path string) (index int, ok bool) { return 0, false } -// disallowVendor checks that srcDir (containing package importerPath, if non-empty) -// is allowed to import p as path. +// disallowVendor checks that srcDir is allowed to import p as path. // If the import is allowed, disallowVendor returns the original package p. // If not, it returns a new package containing just an appropriate error. -func disallowVendor(srcDir string, importer *Package, importerPath, path string, p *Package, stk *ImportStack) *Package { +func disallowVendor(srcDir string, path string, p *Package, stk *ImportStack) *Package { // The stack includes p.ImportPath. // If that's the only thing on the stack, we started // with a name given on the command line, not an |