We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider the following snippet:
package main var x = 0 + 1 + 2 // C1 func main() { // C2 }
gofmt formats this code with two indents before the 2, when only one is expected such that it aligns with the 1 + on the previous line.
2
1 +
If you remove the "// C2", then it formats as you would expect:
package main var x = 0 + 1 + 2 // C1 func main() { }
You can see it happen on the playground: https://play.golang.org/p/FGRkk773Az
\cc @griesemer @bradfitz @odeke-em
The text was updated successfully, but these errors were encountered:
Wow, crazy. If you increase the length of the line with C2, the number of indents increase:
package main var x = 0 + 1 + 2 // C1 func reallyReallyReallyReallyReallyReallyLongName() { // C2 }
Sorry, something went wrong.
This is fixed on tip. Closing.
No branches or pull requests
Consider the following snippet:
gofmt formats this code with two indents before the
2
, when only one is expected such that it aligns with the1 +
on the previous line.If you remove the "// C2", then it formats as you would expect:
You can see it happen on the playground: https://play.golang.org/p/FGRkk773Az
\cc @griesemer @bradfitz @odeke-em
The text was updated successfully, but these errors were encountered: