Releases: headlesslab/fetch
Release list
v0.1.1
Patch release: every statement is covered and the CI coverage ratchet is at 100. No API change.
- A write error surfacing when the downloaded archive is closed is reported together with the copy error.
- Each fallback attempt extracts into a fresh directory instead of clearing the previous one.
WithStripFirstDirdecides from the entries the extractor wrote rather than re-reading the tree.- New tests for every error branch: entries that cannot be written, a file on the way to the destination, a destination landed by someone else before the rename, a cancel during extraction, and, on Linux as a non-root user, unwritable or unreadable directories at each step.
v0.1.0
First release of fetch, the generic zip archive fetcher that wand's launcher will use for managed browsers.
fetch.Zip(ctx, dir, urls, opts...) probes every URL concurrently and downloads from the first host to answer, keeping the others as fallbacks; hashes the archive as it streams and compares it with WithSHA256 before opening it; holds a gofrs/flock lock next to the destination around download and extraction; extracts into a temporary sibling directory and lands it with one rename, so the destination is never half-written. WithStripFirstDir makes an archive's single top-level folder the destination.
Go 1.21 or later. Tested with -race on Linux (Go floor and stable), Windows and macOS.