You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following isn't modified by gofmt nor gofumpt:
package main
func main() {
foo :=
"bar"
}
We should probably not allow such a newline. I would have guessed that it was valid Go, but that gofmt would not allow it.
I'm trying to think of a scenario where it would make sense, but I can't. There isn't any consistency with a closing token on a separate line here. The only possibly reasonable use case I can think of is:
foo :=
`
multi-line
content
`
Which someone could think is a tiny bit nicer than:
foo := `
multi-line
content
`
Still, I don't think it's worth the weird syntax and extra newline/verbosity.
The text was updated successfully, but these errors were encountered:
The following isn't modified by gofmt nor gofumpt:
We should probably not allow such a newline. I would have guessed that it was valid Go, but that gofmt would not allow it.
I'm trying to think of a scenario where it would make sense, but I can't. There isn't any consistency with a closing token on a separate line here. The only possibly reasonable use case I can think of is:
Which someone could think is a tiny bit nicer than:
Still, I don't think it's worth the weird syntax and extra newline/verbosity.
The text was updated successfully, but these errors were encountered: