Debian Codegraph @

lspext/implementation.go

raw symbols SCIP
1 package lspext
2
3 import "github.com/sourcegraph/go-lsp"
4
5 // ImplementationLocation is a superset of lsp.Location with additional Go-specific information
6 // about the implementation.
7 type ImplementationLocation struct {
8 lsp.Location // the location of the implementation
9
10 // Type is the type of implementation relationship described by this location.
11 //
12 // If a type T was queried, the set of possible values are:
13 //
14 // - "to": named or ptr-to-named types assignable to interface T
15 // - "from": named interfaces assignable from T (or only from *T if Ptr == true)
16 //
17 // If a method M on type T was queried, the same set of values above is used, except they refer
18 // to methods on the described type (not the described type itself).
19 //
20 // (This type description is taken from golang.org/x/tools/cmd/guru.)
21 Type string `json:"type,omitempty"`
22
23 // Ptr is whether this implementation location is only assignable from a pointer *T (where T is
24 // the queried type).
25 Ptr bool `json:"ptr,omitempty"`
26
27 // Method is whether a method was queried. If so, then the implementation locations refer to the
28 // corresponding methods on the types found by the implementation query (not the types
29 // themselves).
30 Method bool `json:"method"`
31 }