Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
go/printer: consider permitting one-line "enum" const decls #13403
A declaration of the form:
gets formatted as:
The former is close to what in other languages might be achieved with an "enum" declaration. If there's several such simple const decls, the latter form uses undue amount of space w/o much readability benefit.
Consider recognizing this special case and not introduce line-breaks if there were none in the original source.
@agnivade You're welcome to investigate and play with it but I am probably not going to look at this (or any related CLs) any time soon. We have a freeze coming up on May 1 and this is not important at all and we many more important issues to tackle at the moment. Thanks.