]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: use a structured error for 'ambiguous import'
authorBryan C. Mills <bcmills@google.com>
Wed, 18 Sep 2019 20:35:00 +0000 (16:35 -0400)
committerBryan C. Mills <bcmills@google.com>
Thu, 19 Sep 2019 18:50:11 +0000 (18:50 +0000)
commitd6c2f1e90ed2eb25ca5b00fef9a4d13b01a4a1c5
tree1f712827e121398f7ef31022b5f619edc301fb1b
parent83feeedaecd2a367a2855d5fca5829ded5c52930
cmd/go/internal/modload: use a structured error for 'ambiguous import'

This consolidates the construction of 'ambiguous import' errors to a
single location, ensuring consistency, and lays the groundwork for
automatic resolution in the future.

While we're at it, change "found" to "found package" to try to make
the cause of the error clearer.

Updates #32128
Updates #27899

Change-Id: I14a93593320e5c60d20b0eb686d0d5355763c30c
Reviewed-on: https://go-review.googlesource.com/c/go/+/196298
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modload/import.go
src/cmd/go/testdata/script/mod_ambiguous_import.txt [new file with mode: 0644]