Drop the wrong go.sum reason for not keeping the module cache
check / check (push) Canceled after 0s

The key point under the canonical Go Dockerfile said a kept module
cache would skip checking modules against go.sum. Go checks every
module it takes from the module cache against go.sum, so a kept
module cache skips only the download. The sentence now says that.

Model: opus-5-5
This commit is contained in:
2026-10-15 12:59:47 +00:00
parent 236d30bb3c
commit ae3bef5362
+3 -3
View File
@@ -280,9 +280,9 @@ style conventions are in separate documents:
check builds, and Go reuses one only when all its inputs are unchanged, so check builds, and Go reuses one only when all its inputs are unchanged, so
it saves the compile without skipping a check. Nothing else is kept: it saves the compile without skipping a check. Nothing else is kept:
golangci-lint's own cache would replay stored findings in place of a lint golangci-lint's own cache would replay stored findings in place of a lint
run, and the module cache would skip downloading the modules and checking run, and the module cache would skip downloading the modules. Go's build
them against `go.sum`. Go's build cache also holds test results, which is cache also holds test results, which is why both `go test` runs carry
why both `go test` runs carry `-count=1`. `-count=1`.
- If the project uses `//go:embed` directives that reference build artifacts - If the project uses `//go:embed` directives that reference build artifacts
(e.g. a web frontend compiled in a separate stage), the lint phase must (e.g. a web frontend compiled in a separate stage), the lint phase must
create placeholder files so the embed directives resolve. Example: create placeholder files so the embed directives resolve. Example: