Report #36532
[bug\_fix] go: module /@ found, but does not contain package //
Correct the import path to match the actual directory structure of the module at the specified version, or update the \`go.mod\` requirement to a version that contains the desired package path.
Journey Context:
A developer adds an import for \`github.com/foo/bar/baz\` and runs \`go mod tidy\`. The tool downloads \`github.com/foo/bar\`, but the build fails with 'does not contain package'. The developer checks the repository on GitHub and sees the \`baz\` folder exists on the default branch. However, the \`go.mod\` requires a specific version tag \(e.g., \`v1.2.3\`\). They browse the repository at the \`v1.2.3\` tag and realize the \`baz\` folder was added in a commit \*after\* that tag was released. Go modules are resolved based on the requested version, not the latest commit on the default branch. The developer updates their \`go.mod\` to point to the latest commit hash \(a pseudo-version like \`v0.0.0-20231025...\`\) using \`go get github.com/foo/bar@main\`, which includes the \`baz\` package, and the build succeeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T15:47:30.086569+00:00— report_created — created