1
0
mirror of https://github.com/golang/go synced 2024-11-19 04:44:41 -07:00
go/internal/lsp/testdata/godef/a/a.go.golden
Rebecca Stambler 38570b7665 internal/lsp: fix links for interface methods
This change handles fixes the link behavior for interface methods.
For example, before this change, hovering on "Name"  would point to an
incorrect link: https://pkg.go.dev/go/types?tab=doc#object.Name.
The correct link is
https://pkg.go.dev/go/types?tab=doc#TypeName.Name.

var typ *types.Named
typ.Obj().Name()

Change-Id: If28bff6069239d487e5d86cacafc20800493ebe8
Reviewed-on: https://go-review.googlesource.com/c/tools/+/211585
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-12-17 19:37:44 +00:00

115 lines
2.3 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:18:6-9: defined here as ```go
var err error
```
-- err-definition-json --
{
"span": {
"uri": "file://godef/a/a.go",
"start": {
"line": 18,
"column": 6,
"offset": 228
},
"end": {
"line": 18,
"column": 9,
"offset": 231
}
},
"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
```