1
0
mirror of https://github.com/golang/go synced 2024-10-01 11:18:32 -06:00
go/internal/lsp/testdata/cgoimport/usecgo.go.golden
Rebecca Stambler cfcbc7796e internal/lsp: improve link in documentation on hover
This change refactors some of the logic that builds a link anchor for
a given symbol, pushing the actual Link into the HoverInformation struct.
This is necessary because type information is needed to build up that
link in certain cases, like methods.

The last step will be to correctly display struct fields.

Updates golang/go#34240
Fixes golang/go#36031

Change-Id: I7f989faddbaa07f91838a870b4477bf78ce8ddf7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/210201
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-12-12 22:39:21 +00:00

31 lines
720 B
Plaintext

-- funccgoexample-definition --
cgo/declarecgo.go:17:6-13: defined here as [`cgo.Example` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/cgo#Example)
```go
func cgo.Example()
```
-- funccgoexample-definition-json --
{
"span": {
"uri": "file://cgo/declarecgo.go",
"start": {
"line": 17,
"column": 6,
"offset": 153
},
"end": {
"line": 17,
"column": 13,
"offset": 160
}
},
"description": "[`cgo.Example` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/cgo#Example)\n\n```go\nfunc cgo.Example()\n```"
}
-- funccgoexample-hover --
[`cgo.Example` on pkg.go.dev](https://pkg.go.dev/golang.org/x/tools/internal/lsp/cgo#Example)
```go
func cgo.Example()
```