1
0
mirror of https://github.com/golang/go synced 2024-11-19 03:54:42 -07:00
go/internal/lsp/testdata/godef/a/a.go
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

35 lines
589 B
Go

// A comment just to push the positions out
package a
import (
"fmt"
"go/types"
"sync"
)
var (
// x is a variable.
x string //@x,hover("x", x)
)
type A string //@A
func AStuff() { //@AStuff
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)
var mu sync.Mutex
mu.Lock() //@Lock,hover("Lock", Lock)
var typ *types.Named
typ.Obj().Name() //@Name,hover("Name", Name)
}