Skip to content

x/tools/cmd/goimports: spurious blank line in import block #9961

@rsc

Description

@rsc
g% cat /tmp/x.go
package p

import (
    "testing"

    "rsc.io/p"
)

var (
    _ = flag.String
    _ testing.T
    _ p.P
    _ = regexp.Compile
)
g% goimports /tmp/x.go
package p

import (
    "flag"
    "testing"

    "regexp"

    "rsc.io/p"
)

var (
    _ = flag.String
    _ testing.T
    _ p.P
    _ = regexp.Compile
)
g% 

The blank line between "testing" and "regexp" shouldn't be there (and then regexp should be sorted above testing). This appears to be a minimal example.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions