Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 25 Oct 09:14
· 17 commits to master since this release
4071473

godownload v2.0.0 — a full rewrite of the 2019 library.

Highlights

  • Error-based API (breaking change from v1): all methods return error instead of log.Fatal/panic
  • Atomic writes: files land under their final name only after a successful write (.part + rename)
  • Resumable downloads: Range requests continue interrupted downloads from the .part file
  • Progress callbacks: OnProgress(transferred, total) with periodic and final notifications
  • Checksum verification: md5/sha1/sha256/sha512, verified before the file becomes visible
  • Rate limiting: RateLimit in bytes per second (token-bucket)
  • Multi-segment downloads: parallel ranged segments with per-segment resume, transparent fallback for servers without Range support
  • YAML manifests: declarative download lists with per-item overrides and mirror failover (FromManifest)
  • context.Context: context-aware variants of every public method
  • CLI: cmd/godownload with binaries for linux/darwin/windows (amd64/arm64)

Install

go get github.com/saromanov/godownload@v2.0.0

Or grab a binary from the assets below (checksums in .sha256 files).

Full Changelog: see the squashed PRs #3–#12.