1
0
mirror of https://github.com/golang/go synced 2024-11-19 09:44:46 -07:00
go/internal/lsp/testdata/godef/a/a.go.golden
Barnaby Keene 69111344d4 internal/lsp: expose godoc or pkg.go.dev link on hover
This adds a link to documentation to the hover contents for the
current symbol if it is exported.

Updates golang/go#34240

Change-Id: I19c66e91e46f79284bfd0006c53f518eda4edef7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/200604
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-12-05 20:53:10 +00:00

79 lines
1.8 KiB
Plaintext

-- Random-definition --
godef/a/random.go:3:6-12: defined here as func Random() int
[Random on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random)
-- Random-definition-json --
{
"span": {
"uri": "file://godef/a/random.go",
"start": {
"line": 3,
"column": 6,
"offset": 16
},
"end": {
"line": 3,
"column": 12,
"offset": 22
}
},
"description": "func Random() int\n[Random on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random)"
}
-- Random-hover --
func Random() int
[Random on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random)
-- Random2-definition --
godef/a/random.go:8:6-13: defined here as func Random2(y int) int
[Random2 on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)
-- Random2-definition-json --
{
"span": {
"uri": "file://godef/a/random.go",
"start": {
"line": 8,
"column": 6,
"offset": 71
},
"end": {
"line": 8,
"column": 13,
"offset": 78
}
},
"description": "func Random2(y int) int\n[Random2 on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)"
}
-- Random2-hover --
func Random2(y int) int
[Random2 on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)
-- err-definition --
godef/a/a.go:14:6-9: defined here as var err error
-- err-definition-json --
{
"span": {
"uri": "file://godef/a/a.go",
"start": {
"line": 14,
"column": 6,
"offset": 203
},
"end": {
"line": 14,
"column": 9,
"offset": 206
}
},
"description": "var err error"
}
-- err-hover --
var err error
-- make-hover --
The make built-in function allocates and initializes an object of type slice, map, or chan (only).
func(t Type, size ...IntegerType) Type
-- string-hover --
string