1
0
mirror of https://github.com/golang/go synced 2024-11-19 05:34:40 -07:00
go/internal/lsp/testdata/godef/a/a.go
Rebecca Stambler bffc5affc6 internal/lsp: support definitions and hover for builtins
This change adds support for definitions and hover for builtin types and
functions. It also includes some small (non-logic) changes to the import
spec definition function.

Additionally, there are some resulting changes in diagnostics to ignore
the builtin file but also use it for definitions (Ian, you were right
with your comment on my earlier review...).

Fixes golang/go#31696

Change-Id: I52d43d010a5ca8359b539c33e40782877eb730d0
Reviewed-on: https://go-review.googlesource.com/c/tools/+/177517
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-05-17 00:35:10 +00:00

20 lines
375 B
Go

// A comment just to push the positions out
package a
import "fmt"
type A string //@A
func Stuff() { //@Stuff
x := 5
Random2(x) //@godef("dom2", Random2)
Random() //@godef("()", Random)
var err error //@err
fmt.Printf("%v", err) //@godef("err", err)
var y string //@string,hover("string", string)
_ = make([]int, 0) //@make,hover("make", make)
}