logoalt Hacker News

bccdeelast Tuesday at 6:17 PM1 replyview on HN

Sure, why not? Let the programmer decide if they want one line or three lines; the tool can permit both. Gofmt is line-length-agnostic—breaking up long lines is already considered to be the programmer's responsibility.


Replies

verdvermlast Thursday at 5:26 AM

go fmt already changes one-liner if statements to be multi-line

you are proposing changing this, making code look different based on differences of opinions between developers

go fmt is actually one of the top rated features of Go, it makes everyone's code look the same, everyone has nitpicks about it, yet by and large it is one of the most loved things about Go. Breaking this is even less likely than changing error handling

show 1 reply