x/tools/imports: imports.Process chooses wrong import paths when v2 module is used #44737
Labels
FrozenDueToAge
Tools
This label describes issues relating to any tools in the x/tools repository.
WaitingForInfo
Issue is not actionable because of missing required information, which needs to be provided.
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?
Run
imports.Process("filename.go", filedata, nil)
with filefilename.go
containing:and
filedata
containing:(same but no import)
What did you expect to see?
Original file with original import:
What did you see instead?
Import without
/v2
part:Aliased imports like
import alias "github.com/IlyaFloppy/importsbuglib"
are not present after usingimports.Process
.Full example is available at https://github.com/IlyaFloppy/importsbug which uses https://github.com/IlyaFloppy/importsbuglib
The text was updated successfully, but these errors were encountered: