package chautil

import "golang.org/x/tools/go/callgraph/internal/chautil"

Package chautil provides helper functions related to class hierarchy analysis (CHA) for use in x/tools.

Index

Functions

func LazyCallees

func LazyCallees(fns map[*ssa.Function]bool) func(site ssa.CallInstruction) []*ssa.Function

LazyCallees returns a function that maps a call site (in a function in fns) to its callees within fns. The set of callees is computed using the CHA algorithm, i.e., on the entire implements relation between interfaces and concrete types in fns. Please see golang.org/x/tools/go/callgraph/cha for more information.

The resulting function is not concurrency safe.

Source Files

lazy.go

Version
v0.32.0 (latest)
Published
Apr 8, 2025
Platform
js/wasm
Imports
3 packages
Last checked
56 minutes ago

Tools for package owners.