1
0
mirror of https://github.com/golang/go synced 2024-11-19 05:24:42 -07:00
go/internal/lsp/testdata/godef/a/a.go.golden
Rebecca Stambler 61483d104a internal/lsp: show comments for grouped variable declarations
Fixes golang/go#36139

Change-Id: I8aaf1a5d65b8d66ea7bb350439cc960c7505307d
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211637
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-12-18 20:39:36 +00:00

121 lines
2.4 KiB
Plaintext

-- Lock-hover --
Lock locks m\.
[`(sync.Mutex).Lock` on pkg.go.dev](https://pkg.go.dev/sync#Mutex.Lock)
```go
func (*sync.Mutex).Lock()
```
-- Name-hover --
Name returns the object\'s \(package\-local, unqualified\) name\.
[`(types.TypeName).Name` on pkg.go.dev](https://pkg.go.dev/go/types#TypeName.Name)
```go
func (*types.object).Name() string
```
-- Random-definition --
godef/a/random.go:3:6-12: defined here as [`a.Random` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random)
```go
func Random() int
```
-- 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": "[`a.Random` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random)\n\n```go\nfunc Random() int\n```"
}
-- Random-hover --
[`a.Random` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random)
```go
func Random() int
```
-- Random2-definition --
godef/a/random.go:8:6-13: defined here as [`a.Random2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)
```go
func Random2(y int) int
```
-- 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": "[`a.Random2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)\n\n```go\nfunc Random2(y int) int\n```"
}
-- Random2-hover --
[`a.Random2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)
```go
func Random2(y int) int
```
-- err-definition --
godef/a/a.go:23:6-9: defined here as ```go
var err error
```
-- err-definition-json --
{
"span": {
"uri": "file://godef/a/a.go",
"start": {
"line": 23,
"column": 6,
"offset": 287
},
"end": {
"line": 23,
"column": 9,
"offset": 290
}
},
"description": "```go\nvar err error\n```"
}
-- err-hover --
```go
var err error
```
-- make-hover --
The make built\-in function allocates and initializes an object of type slice, map, or chan \(only\)\.
[`make` on pkg.go.dev](https://pkg.go.dev/builtin#make)
```go
func(t Type, size ...IntegerType) Type
```
-- string-hover --
```go
string
```
-- x-hover --
x is a variable\.
```go
var x string
```