mirror of
https://github.com/golang/go
synced 2024-11-19 09:04:41 -07:00
8aaa1484dc
This change adds a few simple tests for the goimports behavior of gopls. There are still missing cases for non-standard library, but this is a good start. Change-Id: I2f9bc2cc876dcabf81413384b83fa3508517adf0 Reviewed-on: https://go-review.googlesource.com/c/tools/+/179918 Run-TryBot: Rebecca Stambler <rstambler@golang.org> Reviewed-by: Ian Cottrell <iancottrell@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
27 lines
370 B
Plaintext
27 lines
370 B
Plaintext
-- goimports --
|
|
package imports //@import("package")
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
)
|
|
|
|
func goodbye() {
|
|
fmt.Printf("HI")
|
|
log.Printf("byeeeee")
|
|
}
|
|
|
|
-- goimports-d --
|
|
--- imports/needs_imports.go.orig
|
|
+++ imports/needs_imports.go
|
|
@@ -1,5 +1,10 @@
|
|
package imports //@import("package")
|
|
|
|
+import (
|
|
+ "fmt"
|
|
+ "log"
|
|
+)
|
|
+
|
|
func goodbye() {
|
|
fmt.Printf("HI")
|
|
log.Printf("byeeeee") |