download: fix ignored OCI downloader settings (#9113)
Running the unused linter with field-writes-are-uses set to false, which is not enabled in .golangci.yaml, flags five fields in this package that are only ever written. Two of them are real bugs. OCIDownloader.WithSizeLimitBytes and WithBundlePersistence stored their arguments in fields download() never read, so size_limit_bytes went unenforced for OCI bundle sources and the reader's guard on persisted delta bundles could never fire. Wire both through as Downloader does. The rest are dead: the trigger channel on both downloaders, unused since Trigger() calls oneShot directly, and Downloader.stopped, dead since Stop() moved to sync.Once. TestStopWithMultipleCalls asserted on the latter, a check that could not fail; it now asserts the Stop calls return, the deadlock it guards. Signed-off-by: Sebastian Spaink <sebastianspaink@gmail.com>
S
Sebastian Spaink committed
a369c83d4a001efd6df79c839e929195b00f2eb5
Parent: de90223
Committed by GitHub <noreply@github.com>
on 9/1/2026, 2:06:09 PM