methodrefs

command
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command methodrefs reports, with type information, which functions call each method of one Go type.

Usage: go run ./test/parity/cmd/methodrefs (-type <pkg import path>.<Type> | -types A,B,... | -funcs <pkg import path>.<Func>,...) [-out refs.json] <package pattern>...

-types keys the output by type name; the member "_type" lists the functions that mention the type or read or write one of its fields. -funcs keys the output by function name; the member "_call" lists the functions that call it.

A call counts only when the selector's receiver type is the named type (or a pointer to it), so a generic method name such as Render or Messages is attributed to its own type and not to every type that defines it. A caller is the enclosing top-level function, written Recv.Name for a method. Calls in files ending _test.go are reported as tests.

Jump to

Keyboard shortcuts

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