-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to handle duplicate imports of one package? #132
Comments
Hi! Thanks for reaching out.
Example: test_file : link Please let me know, if this doesn't work, thanks! |
@lverma14, could a single patch UX for this be turned into a feature request ticket or is a two-patch approach suitable in similar situations? |
So a detail that may not be super obvious: @@
var logrus identifier
@@
import logrus "github.com/sirupsen/logrus" That matches any logrus import—named or unnamed. It records the knowledge of whether it's named or unnamed in that Unfortunately, there's no way to control which import it matches if there are multiple. There are a couple possible feature requests to consider here:
|
I have some files that import the same library package multiple times with different names:
I was hoping to write a gopatch to clean these up but I can't seem to do it. This patch on its own
only matches one of the two imports and I can't seem to control which one it matches.
The text was updated successfully, but these errors were encountered: