gocalls

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package gocalls resolves Go CALLS edges in-process via go/packages + a VTA (Variable Type Analysis) call graph — the same machinery gopls uses, no subprocess, no main needed. VTA tracks the concrete types each variable can hold, so an interface call dispatched on a known type does not over-approximate to every implementation of that interface (CHA's main imprecision). Only edges between functions/methods that exist in the node set are kept (honest precision); stdlib/dep targets are dropped. Test files are loaded (packages Tests:true) so calls from *_test.go contribute edges too — a major recall source for "who calls X".

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CallEdges

func CallEdges(project, root string, known func(qn string) bool) (edges []graph.Edge, err error)

CallEdges loads the Go packages under root and returns CALLS edges whose caller and callee are both known nodes. Best-effort: load errors don't abort (it builds the graph from whatever type-checked).

Types

This section is empty.

Jump to

Keyboard shortcuts

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