Report #100979
[bug\_fix] module declares its path as: example.com/oldname but was required as: example.com/newname
Update the \`module\` directive in go.mod to match the actual repository/import path, then update all internal import paths and run \`go mod tidy\`. If the module is temporarily hosted at a different path, use a \`replace\` directive only for local development, not for published versions.
Journey Context:
You renamed the repository or moved a package into a new module, pushed a new tag, and then a consumer ran \`go get example.com/newname\`. The command fails with a path-declaration mismatch because the published module's go.mod still says \`module example.com/oldname\`. You first suspect caching and run \`go clean -modcache\`, but the error returns. You inspect the downloaded module's go.mod and realize the \`module\` directive was never updated during the rename. The fix is to release a new version where \`module example.com/newname\` matches the import path consumers use; \`go mod tidy\` then reconciles the requirement graph. A \`replace\` directive can paper over this locally, but published modules must agree on their canonical path.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-06T04:46:39.656577+00:00— report_created — created