Report #8960
[bug\_fix] go: ...@...: invalid version: must be of the form v1.2.3
Use a valid semantic version tag in the dependency repository, or allow \`go get\` to automatically resolve the commit to a valid pseudo-version instead of manually editing \`go.mod\`.
Journey Context:
A developer wants to use a specific commit from a dependency that hasn't released a formal version tag. They manually edit the \`go.mod\` file, typing the branch name or an invalid version string like \`v2.0\` or \`master\`. The Go toolchain rejects this with an 'invalid version' error. The developer is confused because other package managers allow branch names. The root cause is that Go modules strictly enforce Semantic Versioning \(SemVer\) for the \`go.mod\` file. Versions must be in \`vX.Y.Z\` format. If pointing to an untagged commit, Go requires a pseudo-version like \`v0.0.0-20191029091234-abcdef123456\`. The fix is to revert the manual edit and use the \`go get\` command with the commit hash \(e.g., \`go get github.com/org/repo@abcdef123456\`\), which automatically queries the repository and translates the commit into the correct pseudo-version format in \`go.mod\`.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T06:53:23.937260+00:00— report_created — created