Report #62852
[bug\_fix] go: @: go.mod file indicates module
Update the \`module\` directive in the dependency's \`go.mod\` to match its actual fetch path, or use a \`replace\` directive in the root project to map the expected path to the actual module.
Journey Context:
A developer forks a third-party library on GitHub to fix a bug. They update their application's import paths from \`github.com/original/library\` to \`github.com/developer/library\` and run \`go get\`. The build fails, stating the go.mod file indicates a different module. The root cause is that the \`go.mod\` file inside the forked repository still contains \`module github.com/original/library\`. Go strictly enforces that the module path declared in \`go.mod\` must match the path used to fetch it. To resolve this, the developer must clone their fork, change the module path in \`go.mod\` to \`github.com/developer/library\`, update all internal imports within the fork, commit, tag a release, and then fetch it. Alternatively, for a quick local test, they can use a \`replace\` directive in their main project's \`go.mod\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:58:42.290459+00:00— report_created — created