Fix it fast
Most likely: The checked-in go.sum no longer matches the packages the current graph needs to load.
Confirm this is your error
Match the output and confirm you are troubleshooting the same failure.
use.go:3:8: missing go.sum entry for module providing package rsc.io/quote (imported by use); to add:
go get use
missing go.sum entry for module providing package rsc.io/quote; to add:
go mod download rsc.io/quote Check the cause
Run focused checks to identify what is failing in this environment.
go version
go env GOFLAGS GOMOD GOWORK
go mod tidy -diff # Go 1.23+ only
git diff -- go.mod go.sum Apply the safe fix
Use the smallest safe change that addresses the confirmed cause.
# Review the preview first, then apply the intended graph update
go mod tidy
# Or use the exact narrow command printed by Go
go mod download <module> Verify it works
Repeat the relevant checks and confirm the original error is gone.
go mod tidy -diff # Go 1.23+ only
go build ./...
go test ./... Avoid unsafe shortcuts
Keep security and data protections in place while troubleshooting.
- Do not delete
go.sumto silence a missing-entry error. - Do not accept a large dependency rewrite without reviewing why each change occurred.
What This Error Means
Read this as a precise clue about which part of the workflow broke first. Once you know the failing layer, the fix path gets much shorter.
How to Fix It
The fastest fixes here come from checking the immediate failing layer before you change anything unrelated. Make one correction at a time and re-test from the same environment.
Intended graph change:run go mod tidy, then review both module files and selected versions.
Narrow missing hash:run Go’s exact suggested command and review its diff.
Accidental repository drift:restore the reviewed go.mod and go.sum pair from source control rather than regenerating unknown changes.
Readonly CI failure:update module files in a branch and keep readonly mode in the verification job.
Before Go 1.23:run go mod tidy in a clean worktree and inspect the diff.
Why It Happens
go.sum was omitted, partially resolved during a merge, or updated separately from go.mod.
A new import, test, tool, platform file, or build tag added a dependency.
Readonly mode exposed drift that a mutable local command had hidden.
The cache contains source, but go.sum lacks the hash needed to authenticate it.
Verify the Fix
On Go 1.23+, run go mod tidy -diff and expect no output and a zero exit status.
Repeat the original command with the same GOFLAGS and check for unexpected upgrades.
Identify why the checksum is missing
Run go version. On Go 1.23+, use go mod tidy -diff to preview changes without modifying module files.
Review git diff -- go.mod go.sum and the import in the error. Decide whether this is an intended change or a partial merge.
Check go env GOFLAGS. Build commands normally act readonly when automatic vendor mode is not selected, even without an explicit -mod=readonly flag.
How Go authenticates a package with go.sum
This is the part worth understanding if the quick fix did not hold. It explains what Go is trying to do at the moment the error appears.
Go checks downloaded module zips and go.mod files against go.sum and, for public modules, the checksum database.
When module files cannot be updated, Go reports the missing hash. go mod tidy may add sums for tests, tools, and build-tag variants beyond the current platform.
Prevent It From Coming Back
To prevent this, commit and review go.mod and go.sum together, use go mod tidy -diff in Go 1.23+ CI jobs to detect drift before a readonly build, and use the same Go version on developer machines, CI, and dependency-update jobs.
Docs and source code
Go module import loader source
Current source for missing go.sum entry messages and the generated remediation hint. - Source
The loader reports the missing sum and suggests go get or go mod download for the relevant import. Go Modules Reference
Official reference for module files, version selection, proxies, private modules, checksums, workspaces, and vendoring. - Source
The go command uses module paths and versions to resolve, download, and authenticate dependencies. Go 1.23 Release Notes
Official introduction of the non-mutating go mod tidy -diff flag. - Source
Go 1.23 added go mod tidy -diff to print required changes without modifying module files.