-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted
Milestone
Description
Create a file with the following contents:
package main
import (
"math" // fun
)
func main() {
x := math.MaxInt64
fmt.Println(strings.Join(",", []string{"hi"}), x)
}$ goimports -d /tmp/a.go
diff -u /tmp/a.go.orig /tmp/a.go
--- /tmp/a.go.orig 2018-02-05 15:44:54.612402902 -0800
+++ /tmp/a.go 2018-02-05 15:44:54.612402902 -0800
@@ -1,7 +1,9 @@
package main
import (
- "math" // fun
+ "fmt"
+ "math"
+ "strings" // fun
)
func main() {Expected:
$ goimports -d /tmp/a.go
diff -u /tmp/a.go.orig /tmp/a.go
--- /tmp/a.go.orig 2018-02-05 15:44:54.612402902 -0800
+++ /tmp/a.go 2018-02-05 15:44:54.612402902 -0800
@@ -1,7 +1,9 @@
package main
import (
+ "fmt"
"math" // fun
+ "strings"
)
func main() {Versions tested:
go version go1.10rc1 linux/amd64
go version go1.9.3 linux/amd64
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted