Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/gopls: handle import aliases automatically #40278
It is annoying when your file needs to import multiple packages with the same name. Tooling often offers no relief from having to manually import and alias the second package. It would be nice if gopls could help by automatically adding package import aliases when possible and appropriate.
I propose we do something like this to start:
Think this is a dupe of https://golang.org/issue/36077#issuecomment-567741352. Though goimports currently only scans the current package and gopls could do more.