Skip to content

gofmt indentation bug #3147

@robpike

Description

@robpike
This code formats with gofmt as shown. The "Why" comment decorates the odd
line.

package x

func f() {
       templateText := "a" + // A
               "b" + // B
               "c" // C

               // Why is this indented?
       f()
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions