v0.1.0
·
2 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
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.