Skip to content

x/tools/cmd/goimports: lost line between package and import statements in output #26290

@rsc

Description

@rsc
$ cat x.go
package p // comment

import "math"

var _ = fmt.Printf
$ goimports x.go
package p // comment
import "fmt"

var _ = fmt.Printf
$ 

The blank line should not have been removed. This only happens when there is an end-of-line comment on the package statement.

/cc @bradfitz

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions