gograph_globals
Identify package-level variable declarations and the functions that write to them to audit mutable global state and detect thread-safety hazards.
Instructions
Find package-level variable declarations (var blocks) and the functions that mutate them in a specific package. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When auditing mutable global state, identifying thread-safety hazards, or locating shared singleton variables before a concurrency refactor. NOT TO USE: For local-scope variables; for environment variable reads (use gograph_envs). RETURNS: Package-level variable names, types, and the functions that write to them; empty when the package has no package-level variables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | The package name or path to inspect (e.g., 'internal/config') |