1
0
mirror of https://github.com/golang/go synced 2024-11-19 01:24:39 -07:00
go/internal/lsp/testdata/godef/b/e.go
Ian Cottrell 923d258130 internal/lsp: make the guru emulation tests slightly looser with a different matching system
We now match only the things we realy need to, to allow the description to vary more.

Change-Id: Ib3591c41ed5a5c725f2a3efb180ba17f808de51a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/170341
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-04-04 13:25:00 +00:00

29 lines
1.1 KiB
Go

package b
import (
"fmt"
"golang.org/x/tools/internal/lsp/godef/a"
)
func useThings() {
t := a.Thing{} //@mark(bStructType, "ing")
fmt.Print(t.Member) //@mark(bMember, "ember")
fmt.Print(a.Other) //@mark(bVar, "ther")
a.Things() //@mark(bFunc, "ings")
}
/*@
definition(bStructType, "", Thing, "$file:$line:$col-$ecol: defined here as type a.Thing struct{Member string}")
definition(bStructType, "-emulate=guru", Thing, "$file:$line:$col: defined here as type $$a.Thing")
definition(bMember, "", Member, "$file:$line:$col-$ecol: defined here as field Member string")
definition(bMember, "-emulate=guru", Member, "$file:$line:$col: defined here as field Member string")
definition(bVar, "", Other, "$file:$line:$col-$ecol: defined here as var a.Other a.Thing")
definition(bVar, "-emulate=guru", Other, "$file:$line:$col: defined here as var $$a.Other")
definition(bFunc, "", Things, "$file:$line:$col-$ecol: defined here as func a.Things(val []string) []a.Thing")
definition(bFunc, "-emulate=guru", Things, "$file:$line:$col: defined here as func $$a.Things")
*/