Report #57150
[bug\_fix] go: found module path "" but module path in go.mod is ""
Update the module directive in go.mod to exactly match the repository path where the module is hosted, or fix the import paths in the code to match the go.mod module path.
Journey Context:
A developer renames their GitHub repository from 'old-name' to 'new-name' and updates all the import paths in their Go source files accordingly. They push the changes and run \`go get\` in a downstream project, but it fails. The developer is baffled because the imports look correct. The root cause is that the module declaration in go.mod still says \`module github.com/user/old-name\`. The Go toolchain strictly validates that the module path declared in go.mod matches the path used to fetch it. If they don't match, Go assumes a supply chain or configuration error and aborts. Updating the \`module\` directive in go.mod to \`github.com/user/new-name\` and tagging a new release resolves the conflict.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T02:24:52.123766+00:00— report_created — created