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.
cmd/gofmt: aligns type spec alias = with type spec non-alias rhs expressions #24302
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Sorry, gofmt is not soliciting change requests on its format at this time. Gofmt made a set of choices at one point, and everybody agrees to live with them, even if everybody might take issue with different individual choices. (as Rob says: https://www.youtube.com/watch?v=PAAkCSZUG1c&t=8m43s) For Go 2, @griesemer may trawl through the issue tracker for all old gofmt style request bugs.
This reads like you're referring to a years-old policy, so please correct me if that's wrong, but the 1.10 release contradicts this position. Not only did it change the gofmt format:
but the release notes go on to say that gofmt changes are to be expected from time to time:
And then discuss the ramifications:
Was there a policy change after 1.10 shipped that I missed?
Ah, good point! Seems clear it's intentional, then. Makes sense to me to keep this closed.
I should have worded it a bit differently.
If a change is small, then the proper mechanism would be to propose a change to gofmt via the proposal process.
But as this would carry over into other aspects separate from type aliases, I feel it’s too large a change to do at the moment for the reasons stated above.
As noted, @griesemer may look through old gofmt bugs for Go 2. When things get started in earnest I encourage you to re-open the issue. It’s just too early at this point.