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/cmd/goimports: prioritize closer package #17557
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
If there are two files in a package, and you're editing
import io "github.com/altstdlib/io"
... then you'd probably want to do the same thing as the other file in the same package. goimports already scans that and knows that info. I think there's a TODO yet, but it has the info.
But otherwise, if it's not already being used, then stdlib should win, instead of closest.
Has there been any traction on this issue? It's irritating the living daylights out of me. We have a trio of projects that share similar structures, and thus have identically named packages in a number of places. Goimports happily imports the out-of-project versions instead of the local versions ~90% of the time.