golang

package
v0.2.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package golang provides a Go source parser for graph extraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser parses Go source files into graph nodes and edges.

func NewParser

func NewParser() *Parser

NewParser creates a new Go source parser.

func (*Parser) ExtractCalls

func (p *Parser) ExtractCalls(_ context.Context, path string) ([]*graph.Edge, error)

ExtractCalls extracts call graph edges from a Go source file.

func (*Parser) ExtractControlFlow

func (p *Parser) ExtractControlFlow(_ context.Context, path string) ([]*graph.Edge, error)

ExtractControlFlow extracts control-flow ordered call edges from a Go source file.

func (*Parser) ParseFile

func (p *Parser) ParseFile(_ context.Context, path string) ([]*graph.Node, []*graph.Edge, error)

ParseFile extracts symbol nodes and edges from a Go source file.

func (*Parser) SetModuleName added in v0.1.8

func (p *Parser) SetModuleName(name string)

SetModuleName sets the module name for internal package resolution.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL