Report #69571
[bug\_fix] module github.com/[email protected] found, but does not contain package github.com/lib/cool-feature
Update the dependency to the specific commit or branch that contains the package using \`go get github.com/lib/cool-feature@main\` \(or the specific commit hash\), rather than relying on the latest semver tag.
Journey Context:
A developer reads the documentation for a library on its \`main\` branch, which mentions a new sub-package \`github.com/lib/cool-feature\`. They add \`import "github.com/lib/cool-feature"\` to their code. They run \`go mod tidy\`, which resolves the module to the latest released tag, \`v1.5.0\`. The build fails because the sub-package only exists in unreleased commits. The developer is confused because the package clearly exists on GitHub. They go down a rabbit hole of clearing the module cache or checking if the repo was deleted. The fix is to run \`go get github.com/lib/cool-feature@main\` to pull the unreleased code. This works because \`go mod tidy\` resolves dependencies to the latest \*semver tag\* by default, not the \`main\` branch, ensuring build stability over bleeding-edge features.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T23:15:40.522280+00:00— report_created — created