blob: b5909a762446de6b0deca04586a56f4395588ab8 [file] [log] [blame]
-- Lock-hover --
```go
func (*sync.Mutex).Lock()
```
[`(sync.Mutex).Lock` on pkg.go.dev](https://pkg.go.dev/sync#Mutex.Lock)
Lock locks m\.
-- Name-hover --
```go
func (*types.object).Name() string
```
[`(types.TypeName).Name` on pkg.go.dev](https://pkg.go.dev/go/types#TypeName.Name)
Name returns the object\'s \(package\-local, unqualified\) name\.
-- Random-definition --
godef/a/random.go:3:6-12: defined here as ```go
func Random() int
```
[`a.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": "```go\nfunc Random() int\n```\n\n[`a.Random` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random)"
}
-- Random-hover --
```go
func Random() int
```
[`a.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 ```go
func Random2(y int) int
```
[`a.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": "```go\nfunc Random2(y int) int\n```\n\n[`a.Random2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)"
}
-- Random2-hover --
```go
func Random2(y int) int
```
[`a.Random2` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/godef/a#Random2)
-- a-hover --
```go
```
-- aPackage-hover --
Package a is a package for testing go to definition\.
-- err-definition --
godef/a/a.go:33:6-9: defined here as ```go
var err error
```
\@err
-- err-definition-json --
{
"span": {
"uri": "file://godef/a/a.go",
"start": {
"line": 33,
"column": 6,
"offset": 597
},
"end": {
"line": 33,
"column": 9,
"offset": 600
}
},
"description": "```go\nvar err error\n```\n\n\\@err"
}
-- err-hover --
```go
var err error
```
\@err
-- g-hover --
```go
const g untyped int = 1
```
When I hover on g, I should see this comment\.
-- h-hover --
```go
const h untyped int = 2
```
Constant block\.
-- make-hover --
```go
func(t Type, size ...IntegerType) Type
```
[`make` on pkg.go.dev](https://pkg.go.dev/builtin#make)
The make built\-in function allocates and initializes an object of type slice, map, or chan \(only\)\.
-- string-hover --
```go
string
```
-- typesImport-hover --
```go
package types ("go/types")
```
[`types` on pkg.go.dev](https://pkg.go.dev/go/types)
-- x-hover --
```go
var x string
```
x is a variable\.
-- z-hover --
```go
var z string
```
z is a variable too\.