From c41bb3cbd6ccf01ec990c659790916d26b6b5097 Mon Sep 17 00:00:00 2001 From: Aditya Bhushan Sharma Date: Mon, 7 Jul 2025 12:27:19 +0530 Subject: [PATCH] cmd/go: clarify that DiskPath should not contain file extension Fixes #74451 Add documentation to clarify that the DiskPath field in GOCACHEPROG Response should not contain a file extension. This prevents issues with tools like golangci-lint that filter files based on extensions. --- src/cmd/go/internal/cacheprog/cacheprog.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cmd/go/internal/cacheprog/cacheprog.go b/src/cmd/go/internal/cacheprog/cacheprog.go index 9379636e5ab662..73a0aba0f45e46 100644 --- a/src/cmd/go/internal/cacheprog/cacheprog.go +++ b/src/cmd/go/internal/cacheprog/cacheprog.go @@ -122,5 +122,7 @@ type Response struct { // DiskPath is the absolute path on disk of the body corresponding to a // "get" (on cache hit) or "put" request's ActionID. + // The filename in DiskPath should not contain a file extension to ensure + // compatibility with tools that filter files based on extensions. DiskPath string `json:",omitempty"` }