x/tools/cmd/goimports: adds stdlib import conflicting with existing external import #46574
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?
github.com/libp2p/go-libp2p-gorpc
which contains anrpc
package, and userpc
package in code.goimports -d .
What did you expect to see?
I expected to see goimports make no changes to the code since all the imports are in use, there are no missing imports, and the code is well formatted.
What did you see instead?
Goimports adds an import for
net/rpc
, which causes the code not to compile because there are now two imports that import a package namedrpc
.The text was updated successfully, but these errors were encountered: