Skip to content

x/tools/cmd/goimports: comment movement during import add #10337

@josharian

Description

@josharian

Migrated from #6982 comment 6:

http://play.golang.org/p/vXaSQ_EUUg

Before:

package main

import (
        "io" // I Am the Very Model of a Modern Major-General
)

var _ = io.Copy

func main() {
        log.Println("Hi")
}

After:

package main

import (
    "io"
    "log" // I Am the Very Model of a Modern Major-General
)

var _ = io.Copy

func main() {
    log.Println("Hi")
}

Note that the "io" import comment is now next to "log".

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions