graph

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package graph builds call graphs from type-checked Go packages and extracts dependency edges using SSA and CHA analysis.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildResult

type BuildResult struct {
	Edges []Edge
}

BuildResult holds the edges extracted from call graph analysis.

func Build

func Build(ctx context.Context, dir string, patterns []string) (*BuildResult, error)

Build loads Go packages from dir matching the given patterns, builds an SSA program, runs CHA call graph analysis, and extracts dependency edges.

type Edge

type Edge struct {
	SourceName    string // e.g., "Bar"
	SourcePackage string // e.g., "example.com/test/pkg/foo"
	SourceFile    string // absolute path
	TargetName    string
	TargetPackage string
	TargetFile    string
	EdgeType      string // "calls", "implements", "imports"
}

Edge represents a dependency relationship between two symbols.

Jump to

Keyboard shortcuts

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