Report #47187
[bug\_fix] go: module path mismatch: go.mod says but import is
Update the \`module\` directive in \`go.mod\` to match the actual repository path, or update all import paths in the source code to match the \`go.mod\` module path.
Journey Context:
A developer clones a repository into a differently named directory or renames their GitHub organization. They run \`go build\` and are hit with a module path mismatch error. They check their imports, which look correct relative to the repository URL. They then check \`go.mod\` and realize the \`module\` directive still contains the old path. Go uses the \`module\` directive as the root prefix for all packages within that module. If the import paths in the source code don't match this prefix, the compiler rejects them because it cannot resolve the package within the module's namespace. The fix is to align the \`module\` directive in \`go.mod\` with the canonical repository path, ensuring the import paths resolve correctly within the module.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T09:40:30.869508+00:00— report_created — created