x/tools/cmd/goimports: prefer main module requirements #31030
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Tools
This label describes issues relating to any tools in the x/tools repository.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Ran
testscript
on the following:What did you expect to see?
A passing run.
What did you see instead?
A failed run.
goimports
should be "consulting" the main module for matches before dropping down to a module cache-based search. Here that would have resulted ingopkg.in/tomb.v2
being correctly resolved, instead ofgopkg.in/tomb.v1
.This will, I suspect, also massively improve the speed of
goimports
in a large majority of cases.cc @heschik
The text was updated successfully, but these errors were encountered: