Report #8037
[bug\_fix] go: module example.com/m: go.mod has post-v0 path
Update the \`module\` directive in \`go.mod\` to append the major version suffix \(e.g., \`module example.com/m/v2\`\), update all internal import paths to include the \`/v2\` suffix, and tag the release accordingly.
Journey Context:
A developer releases a breaking change and tags it as v2.0.0 in git. When consumers run \`go get example.com/[email protected]\`, the build fails with a 'post-v0 path' error. The developer checks the git tag, which looks correct, and is confused why Go is rejecting it. They discover that Go's semantic import versioning strictly requires that modules with major versions v2 and above must include the major version in their module path. This isn't just a git tag requirement; it's a module identity requirement. By updating \`go.mod\` to \`module example.com/m/v2\` and all internal imports to match, the module becomes a distinct entity from v1, allowing both to coexist in a build and satisfying the toolchain.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T04:22:16.746383+00:00— report_created — created