1package foo //@mark(PackageFoo, "foo"),item(PackageFoo, "foo", "\"golang.org/x/tools/internal/lsp/foo\"", "package")
2
3type StructFoo struct { //@item(StructFoo, "StructFoo", "struct{...}", "struct")
4	Value int //@item(Value, "Value", "int", "field")
5}
6
7// Pre-set this marker, as we don't have a "source" for it in this package.
8/* Error() */ //@item(Error, "Error", "func() string", "method")
9
10func Foo() { //@item(Foo, "Foo", "func()", "func")
11	var err error
12	err.Error() //@complete("E", Error)
13}
14
15func _() {
16	var sFoo StructFoo           //@mark(sFoo1, "sFoo"),complete("t", StructFoo)
17	if x := sFoo; x.Value == 1 { //@mark(sFoo2, "sFoo"),complete("V", Value),typdef("sFoo", StructFoo),refs("sFo", sFoo1, sFoo2)
18		return
19	}
20}
21
22func _() {
23	shadowed := 123
24	{
25		shadowed := "hi" //@item(shadowed, "shadowed", "string", "var"),refs("shadowed", shadowed)
26		sha              //@complete("a", shadowed)
27	}
28}
29
30type IntFoo int //@item(IntFoo, "IntFoo", "int", "type"),complete("", Foo, IntFoo, StructFoo)
31