gograph_constructors
Discover factory functions that return a named Go struct, helping to identify canonical creation paths and ensure all initialization code is updated.
Instructions
Find all factory and constructor functions that instantiate and return a named Go struct (functions whose return type includes the struct name). Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When looking for the canonical way to create a struct, or before modifying struct initialization to ensure all construction paths are updated. NOT TO USE: For direct composite-literal sites (use gograph_literals); for struct fields (use gograph_fields). RETURNS: List of constructor function names with signatures, package paths, and file locations; empty when no factory functions are found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| struct | Yes | The exact name of the target Go struct to find constructors for (e.g., 'User', 'Config') |