gograph_imports
Find all files and packages importing a specific Go package by its exact import path. Useful for tracing consumption before removing or replacing a library.
Instructions
Find all files and packages in the codebase that import a specific package by its exact import path. Requires .gograph/graph.json — run gograph build . first. Read-only; no side effects. WHEN TO USE: When isolating usage of a third-party library before removing or replacing it, or tracing where an internal package is consumed from outside. NOT TO USE: For a package's own outgoing imports (use gograph_deps); for reverse package-level dependency lookup by short name (use gograph_dependents). RETURNS: File paths and package names of all importers; empty when the package is imported nowhere.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | The exact import path of the target package to trace imports for (e.g., 'github.com/redis/go-redis') |