diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-01-06 18:24:31 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-01-06 18:24:31 +0900 |
| commit | ceb75538cfdaff0a37c7d614fb77aa8c75669600 (patch) | |
| tree | f5f150b1dadc39405f31ba0252503a8487a24f26 /internal/pkg/net.go | |
| parent | 0741a614edc4b67fc849f6c1688bc77139cd1e80 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/pkg/net.go')
| -rw-r--r-- | internal/pkg/net.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/pkg/net.go b/internal/pkg/net.go index 9a6814f8..8164d7ce 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]. |
