-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Milestone
Description
What did you do?
I have this file.
package main
func main() {
s := []string{}
ss := strings.Join(s, ",")
fmt.Printf("%#v\n", ss)
}
Running goimports does this.
package main
import (
"fmt"
"strings"
)
func main() {
s := []string{}
ss := strings.Join(s, ",")
fmt.Printf("%#v\n", ss)
}
Removing the line where the fmt package is used does this when goimports is run.
package main
import "strings"
func main() {
s := []string{}
ss := strings.Join(s, ",")
}
What did you expect to see?
I would like the import statement always to be "multiple", no matter how many imports the package has.
import (
....
)
What did you see instead?
On packages suddenly having only one imported package, the import statement is "single". I am a little OCDish on this one. Diffs would be way more nicer and the import statements across files and packages would be way more consistent when the import statement would have always be the same form.
Cheers, Tim.
Reactions are currently unavailable