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: unwrap hard line-wrapped function parameter lists #24191
What did you do?
Go format this code https://play.golang.org/p/eHh2k3LPzoz
What did you expect to see?
Exhibit 1: https://play.golang.org/p/M7ax5VTbxlY
What did you see instead?
Exhibit 2: https://play.golang.org/p/eUXlvJJHzZy
https://blog.golang.org/go-fmt-your-code says that Gofmt'd code is easier to
I think both of these should be addressed to make the points decorated in the blog post more accurate with the spirit of deterministic source code. There is currently easy way to
Preemptive note: I don't think this should apply to parameter lists in general, it can be isolated to function parameters and the number of items in the list spanning a line in the source.
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.