internal/pkg: pass cure context as single value
All checks were successful
Test / Create distribution (push) Successful in 43s
Test / Sandbox (push) Successful in 2m30s
Test / ShareFS (push) Successful in 3m45s
Test / Hpkg (push) Successful in 4m32s
Test / Sandbox (race detector) (push) Successful in 5m3s
Test / Hakurei (race detector) (push) Successful in 5m55s
Test / Hakurei (push) Successful in 2m40s
Test / Flake checks (push) Successful in 1m52s

This cleans up the function signature and makes backwards compatible API changes possible.

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2026-01-06 00:56:49 +09:00
parent 3d4d32932d
commit e91049c3c5
4 changed files with 86 additions and 55 deletions

View File

@@ -7,8 +7,6 @@ import (
"net/http"
"sync"
"syscall"
"hakurei.app/container/check"
)
// An httpArtifact is an [Artifact] backed by a [http] url string. The method is
@@ -101,7 +99,7 @@ func (a *httpArtifact) do() (data []byte, err error) {
}
// Cure returns syscall.ENOTSUP. Callers should use Data instead.
func (a *httpArtifact) Cure(*check.Absolute, *check.Absolute, CacheDataFunc) error {
func (a *httpArtifact) Cure(*CureContext) error {
return syscall.ENOTSUP
}