Report #104235
[bug\_fix] module declares its path as: "example.com/my/module" but was required as: "github.com/user/my/module"
Update the module path in go.mod to match the import path used by dependents: \`module github.com/user/my/module\`. Then run \`go mod tidy\` to update all references.
Journey Context:
I was refactoring a library hosted on an internal git server. We moved the repository from a self-hosted GitLab to GitHub without changing the original module path in go.mod. After pushing the new code, a colleague tried to import the module as \`github.com/org/my/module\` but got the mismatch error. The go tool compares the module path declared in go.mod with the one used in the import statement from the requiring module. Since the paths didn't match, the build failed. I spent an hour checking go.sum and go.mod files, thinking it was a checksum issue. The root cause was simply that the module path in go.mod was still \`example.com/my/module\` from the old repository location.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-19T20:05:48.717186+00:00— report_created — created