cmd/gofmt: Faulty Comment Re-Arrangement in Argument Lists #13113
I noticed today that gofmt (on the Playground at least) reformats
Notice how in the Post-Gofmt case it moves the comment that occurred after the comma to before.
This behavior is incongruent to what happens when the argument lists are spread across multiple lines:
Newline Distributed Pre-Gofmt
Newline Distributed Post-Gofmt
For the pre cases, be sure to click
The text was updated successfully, but these errors were encountered:
I ran into this issue (I'm not sure this is a real issue, tho).
Go does not support named argument. So I wrote parameter names as prefixed comment in function call as below.
SomeFunc(/*name:*/ n, /*debug:*/ true)
SomeFunc(/*name:*/ n /*debug:*/, true)