Documentation
¶
Overview ¶
Package golang implements the Go language extractor.
The package is named `golang` (not `go`) to avoid the keyword collision in Go import paths — matches the smacker/go-tree-sitter/golang convention.
Mirrors src/main/java/.../intelligence/extractor/go/GoLanguageExtractor.java but trimmed to the per-task brief:
- METHOD nodes: emit CALLS edges for call_expression children of the matching function_declaration / method_declaration. Qualified callees (`pkg.Func`) strip to the bare name before lookup so cross-package calls resolve to METHOD nodes that registry-keyed by simple label.
- CLASS nodes: scan for `var _ Iface = (*Foo)(nil)` style interface assertions and stamp `implements_types` with the interface qualifier literal text.
Confidence: PARTIAL — Go's structural typing isn't resolved here.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Extractor ¶
type Extractor struct{}
Extractor implements LanguageExtractor for Go. Stateless.
func (*Extractor) Extract ¶
Extract dispatches by node kind. Single-node convenience wrapper — production paths use ExtractFromTree.
func (*Extractor) ExtractFromTree ¶
func (e *Extractor) ExtractFromTree(ctx extractor.Context, tree *parser.Tree, nodes []*model.CodeNode) []extractor.Result
ExtractFromTree walks the pre-parsed tree once per input node, returning one Result per node in matching order. tree may be nil — every result is EmptyResult in that case.