gograph_literals
Find all locations where a Go struct is initialized with composite literal syntax to assess migration impact when adding required fields.
Instructions
Find every composite-literal initialization site for a named Go struct — all locations where Foo{...} syntax is used to construct the struct. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: Before adding a required field to a struct — every site returned will fail to compile if the new field has no default; run this first to scope the migration blast radius. NOT TO USE: For finding string or integer magic values (use gograph_envs or grep for those); for factory functions that return the struct (use gograph_constructors). RETURNS: All file paths and line numbers where the named struct is composite-initialized; empty when the struct has no direct initialization sites.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| struct | Yes | The name of the struct (e.g., 'User') |