This is more of a question. The current behavior:
var (
foo = "foo"
// bar = "bar"
// baz = "baz"
)
var foo = "foo" // bar = "bar"
// baz = "baz"
Is it desired ? I would expect gofumpt to either keep the parentheses and comments untouched, or to format this way:
var foo = "foo"
// bar = "bar"
// baz = "baz"
This is also consistent with the behavior when adding an inline comment:
var (
foo = "foo" // foo
// bar = "bar"
// baz = "baz"
)
var foo = "foo" // foo
// bar = "bar"
// baz = "baz"
I have no strong opinion on the matter, I just found it surprising. Feel free to close if this is intended