gograph_mocks
Find structs in test files that implement a specified interface, enabling reuse of existing test doubles before creating new mocks.
Instructions
Find structs in *_test.go files that implement a named interface — test doubles, mocks, and stubs. Equivalent to gograph_implementers with test_only=true; kept for compatibility. The MCP server checks freshness before this call and refreshes in the current requested analysis mode; precise and precise_fallback graphs retry CHA/SSA after source changes. Read-only; no side effects. WHEN TO USE: When writing tests and wanting to find existing mock implementations before creating a new one. NOT TO USE: For production interface implementers (use gograph_implementers without test_only); prefer gograph_implementers(test_only=true) for new code. RETURNS: Test-file struct names implementing the interface with file locations; empty when no test mocks exist for the interface.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| interface | Yes | The name of the interface (e.g., 'AuthService') |