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
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
gofmt: Convert URLs to import paths #39324
This is really a feature request, so I'm tweaking the issue template slightly.
What version of Go are you using (
gofmt deals with formatting, while "fixing" imports is an entirely different matter. So I don't think it fits the tool.
Also, going from a source repository URL to an import path isn't as simple as removing the
I wasn't suggesting that the tool would attempt to divine import paths. That's why I solely suggested removing schemes, because it's one thing that's always wrong in that location. It may not be the only thing, but that for sure is wrong.
Sure, maybe the functionality is more suited to goimports. I only use gofmt so I wouldn't benefit, but I get what you're saying.