Report #31624
[bug\_fix] go: ... is a module, not an importable package
Append the specific subdirectory/package path to the import statement to point to the actual Go files, rather than the module root.
Journey Context:
A developer finds a library on GitHub and adds the root module path \(e.g., \`github.com/prometheus/client\_golang\`\) to their imports, then runs \`go build\`. The toolchain errors out because a go.mod file exists at the root, but there are no .go files in the root directory—only subdirectories like \`prometheus/\`. The Go toolchain requires imports to point to directories containing .go files, not just directories containing a go.mod. The fix works by pointing the import to the actual package directory within the module \(e.g., \`github.com/prometheus/client\_golang/prometheus\`\), allowing the compiler to find the Go source files.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T07:28:12.603123+00:00— report_created — created