mirror of
https://github.com/golang/go
synced 2024-11-19 11:34:49 -07:00
490d13020f
I was about to add some more tests and it caused a huge number of golden files, which was hard to deal with. Now all the golden files are packed into a single .golden archive in the txtar format. I also changed the tagging key for hover results to use the marker name rather than the line and column, as it makes it more stable against test data changes. Change-Id: Iaa1f54ab55a41d380db67b9f6f928fa7a52d9a5e Reviewed-on: https://go-review.googlesource.com/c/tools/+/174877 Run-TryBot: Ian Cottrell <iancottrell@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org>
44 lines
499 B
Plaintext
44 lines
499 B
Plaintext
-- gofmt --
|
|
package format //@format("package")
|
|
|
|
import (
|
|
"fmt"
|
|
"log"
|
|
"runtime"
|
|
)
|
|
|
|
func hello() {
|
|
|
|
var x int //@diag("x", "LSP", "x declared but not used")
|
|
}
|
|
|
|
func hi() {
|
|
runtime.GOROOT()
|
|
fmt.Printf("")
|
|
|
|
log.Printf("")
|
|
}
|
|
|
|
-- gofmt-d --
|
|
--- format/bad_format.go.orig
|
|
+++ format/bad_format.go
|
|
@@ -1,16 +1,13 @@
|
|
package format //@format("package")
|
|
|
|
import (
|
|
- "runtime"
|
|
"fmt"
|
|
"log"
|
|
+ "runtime"
|
|
)
|
|
|
|
func hello() {
|
|
|
|
-
|
|
-
|
|
-
|
|
var x int //@diag("x", "LSP", "x declared but not used")
|
|
}
|
|
|
|
|