cmd/gofmt: Unexpected formatting multiline functions in struct literal #23523
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
)?What operating system and processor architecture are you using (
go env
)?What did you do?
Run
gofmt
on the following code:What did you expect to see?
Notice the first struct literal, that the value for
i
is indented to matchsomeFunc
as it is in the second literal.What did you see instead?
The file remains unchanged. This seems to only happen when a multiline function is declared inline.
The text was updated successfully, but these errors were encountered: