x/tools/gopls: incorrect rewrite import for "error" #63592
Labels
gopls
Issues related to the Go language server, gopls.
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
gopls version
go env
What did you do?
My code contains this global variable:
error
refers to the pre-declared error interface.So
error.Error
is the function implemented by this interface that returns a string.What did you expect to see?
When I save my code in my editor, it should save it without changing my imports.
What did you see instead?
When I save the file, gopls rewrites my imports and adds
github.com/coreos/etcd/error
, which breaks my code.Editor and settings
Logs
The text was updated successfully, but these errors were encountered: