gograph_implementers
Finds all concrete structs that implement a specified Go interface via duck-typing. Tracks polymorphism, dependency injection points, and mock implementations.
Instructions
Find all concrete structs that implement a named Go interface via duck-typing (structs whose method set is a superset of the interface's methods). Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. Set test_only=true to restrict to structs in *_test.go files (mocks/stubs). WHEN TO USE: When tracing polymorphism, locating dependency injection points, or finding all mock implementations of an interface. NOT TO USE: For interfaces a struct satisfies — inverse direction (use gograph_interfaces instead); for struct fields (use gograph_fields). RETURNS: List of implementing struct names with package paths and file locations; empty when no struct implements the interface.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| interface | Yes | The name of the interface (e.g., 'AuthService') | |
| test_only | No | If true, return only structs defined in test or mock files (replaces gograph_mocks) |