1 package foo //@mark(PackageFoo, "foo"),item(PackageFoo, "foo", "\"golang.org/x/tools/internal/lsp/foo\"", "package")
3 type StructFoo struct { //@item(StructFoo, "StructFoo", "struct{...}", "struct")
4 Value int //@item(Value, "Value", "int", "field")
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")
10 func Foo() { //@item(Foo, "Foo", "func()", "func")
12 err.Error() //@complete("E", Error)
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)
25 shadowed := "hi" //@item(shadowed, "shadowed", "string", "var"),refs("shadowed", shadowed)
26 sha //@complete("a", shadowed)
30 type IntFoo int //@item(IntFoo, "IntFoo", "int", "type")