cmd/gofmt: wrong indentation when chaining methods in var block #63823
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
When chaining methods, indentation is wrong inside a
var
block if the variable names have different lengths:Playground
What I would expect the code to be formatted like:
This is especially confusing, since
go fmt
will format to what I'd expect, if the declarations weren't enclosed in avar
block:Playground
I found one (somehow) related issue: #32480
The text was updated successfully, but these errors were encountered: