From ceb75538cfdaff0a37c7d614fb77aa8c75669600 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Tue, 6 Jan 2026 18:24:31 +0900 Subject: [PATCH] internal/pkg: update http checksum signature This was using the old pre-KnownChecksum function signature. It did not affect correctness since httpArtifact performs internal validation to avoid the strict mode vfs roundtrip, but it prevented content-addressed cache hits. Signed-off-by: Ophestra --- internal/pkg/net.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/pkg/net.go b/internal/pkg/net.go index 9a6814f..8164d7c 100644 --- a/internal/pkg/net.go +++ b/internal/pkg/net.go @@ -32,6 +32,8 @@ type httpArtifact struct { mu sync.Mutex } +var _ KnownChecksum = new(httpArtifact) + // NewHTTPGet returns a new [File] backed by the supplied client. A GET request // is set up for url. If c is nil, [http.DefaultClient] is used instead. func NewHTTPGet( @@ -59,8 +61,8 @@ func (a *httpArtifact) Params() []byte { return []byte(a.url) } // Dependencies returns a nil slice. func (a *httpArtifact) Dependencies() []Artifact { return nil } -// Checksum returns the address to the caller-supplied checksum. -func (a *httpArtifact) Checksum() *Checksum { return &a.checksum } +// Checksum returns the caller-supplied checksum. +func (a *httpArtifact) Checksum() Checksum { return a.checksum } // ResponseStatusError is returned for a response returned by an [http.Client] // with a status code other than [http.StatusOK].