Report #40692
[bug\_fix] go: github.com/foo/[email protected]: reading github.com/foo/bar/go.mod at revision v1.0.0: unknown revision v1.0.0
Ensure the git tag \`v1.0.0\` is created at the repository root where the \`go.mod\` file exists, and that the repository actually contains a \`go.mod\` file.
Journey Context:
A developer creates a library in a subdirectory of a monorepo, creates a git tag from that subdirectory, and pushes it. When consumers try to \`go get\` the module, Go complains the \`go.mod\` file is missing or the revision is unknown. The developer verifies the tag exists in git and the \`go.mod\` is in the subdirectory, but they don't realize that Go modules expect the \`go.mod\` file to be at the root of the VCS repository \(unless using Go 1.18\+ Go workspaces or specific subdirectory paths, but standard \`go get\` fetches the repo root first\). Alternatively, they tagged an older commit before \`go.mod\` was added. The fix works because moving the \`go.mod\` to the repo root and re-tagging aligns with the Go toolchain's expectation of where module metadata lives relative to the VCS root.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T22:46:18.023315+00:00— report_created — created