]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: make AmbiguousImportError an ImportPathError
authorMichael Matloob <matloob@golang.org>
Thu, 27 Feb 2020 21:18:56 +0000 (16:18 -0500)
committerMichael Matloob <matloob@golang.org>
Fri, 28 Feb 2020 17:51:13 +0000 (17:51 +0000)
commitd464c7ce29faa90ef2d35d5072c3e7c07606c525
tree726bbf6d485a6b7968834860aa6deb14cd5cedd1
parent719b1ba27822e01cbef0d418d26a321a25948313
cmd/go/internal/modload: make AmbiguousImportError an ImportPathError

AmbiguousImportErrors will now be formatted like other ImportPathErrors:
this means that now the ambiguously imported package won't be printed
twice. Whereas the error message looked like the following:

can't load package: package example.com/m/importy: ambiguous import: found package example.com/m/importy in multiple directories:
$WORK/importy
$WORK/vendor/example.com/m/importy

It now looks like this:

can't load package: ambiguous import: found package example.com/m/importy in multiple directories:
$WORK/importy
$WORK/vendor/example.com/m/importy

Change-Id: I52a2074a6b3f5eb7d78d331d0852b7ea6b3735e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/221457
Run-TryBot: Michael Matloob <matloob@golang.org>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/go/internal/modload/import.go
src/cmd/go/testdata/script/mod_ambiguous_import.txt