proposal: cmd/gofmt: treat one line if-statements as it does one line function definitions #44338
Currently, gofmt will change:
The tool could apply this to if-statements as well.
One line if-statements are controversial, and so my code reviewer and I believe that we should leave that choice to the user rather than requiring multi-line if-statements. We already leave this choice to the user in the case of function definitions, and so I was hoping that this wouldn't be much more work than that.
Our motivation for one line if-statements is that something like:
is less distracting and arguably more readable than:
The text was updated successfully, but these errors were encountered: