gograph_mutate
Identify all locations where a specific struct field is assigned, enabling auditing of field mutability and diagnosis of unexpected state changes in Go codebases.
Instructions
Find all assignment sites where a named struct field is written to anywhere in the codebase. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When diagnosing unexpected state changes, auditing field mutability, or finding all places that set a specific field before adding a validation rule. NOT TO USE: For reading field declarations (use gograph_fields); for whole-struct initialization sites (use gograph_literals). RETURNS: File paths and line numbers where the named field is assigned; empty when the field is never written to outside its struct initializers.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field | Yes | The field name to search for mutations (e.g., 'Status') |