···11+when:
22+ - event: ["push"]
33+ branch: ["main"]
44+engine: "nixery"
55+dependencies:
66+ nixpkgs:
77+ - go
88+ - golangci-lint
99+steps:
1010+ - name: Formatting
1111+ command: if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then exit 1; fi
1212+ - name: Linter
1313+ command: golangci-lint run ./...
1414+ - name: Tests
1515+ command: go test -v -race ./...
+5-7
README.md
···11# Chunk
2233-[](https://github.com/cuducos/chunk/actions/workflows/tests.yaml)
44-[](https://github.com/cuducos/chunk/actions/workflows/gofmt.yaml)
55-[](https://github.com/cuducos/chunk/actions/workflows/golint.yaml)
66-[](https://godoc.org/github.com/cuducos/chunk)
33+[](https://godoc.org/tangled.org/cuducos.me/chunk)
44+[](https://github.com/sponsors/cuducos)
7586Chunk is a download tool for slow and unstable servers.
97···1191210### CLI
13111414-Install it with `go install github.com/cuducos/chunk/cmd/chunk@latest` then:
1212+Install it with `go install tangled.org/cuducos.me/chunk/cmd/chunk@latest` then:
15131614```console
1715$ chunk <URLs>
···21192220### API
23212424-The [`Download`](https://pkg.go.dev/github.com/cuducos/chunk#Download) method returns a channel with [`DownloadStatus`](https://pkg.go.dev/github.com/cuducos/chunk#DownloadStatus) statuses. This channel is closed once all downloads are finished, but the user is in charge of handling errors.
2222+The [`Download`](https://pkg.go.dev/tangled.org/cuducos.me/chunk#Download) method returns a channel with [`DownloadStatus`](https://pkg.go.dev/tangled.org/cuducos.me/chunk#DownloadStatus) statuses. This channel is closed once all downloads are finished, but the user is in charge of handling errors.
25232624#### Simplest use case
2725···67656866## Why?
69677070-The idea of the project emerged as it was difficult for [Minha Receita](https://github.com/cuducos/minha-receita) to handle the download of [37 files that adds up to just approx. 5Gb](https://www.gov.br/receitafederal/pt-br/assuntos/orientacao-tributaria/cadastros/consultas/dados-publicos-cnpj). Most of the download solutions out there (e.g. [`got`](https://github.com/melbahja/got)) seem to be prepared for downloading large files, not for downloading from slow and unstable servers — which is the case at hand.
6868+The idea of the project emerged as it was difficult for [Minha Receita](https://codeberg.org/cuducos/minha-receita) to handle the download of [37 files that adds up to just approx. 5Gb](https://www.gov.br/receitafederal/pt-br/assuntos/orientacao-tributaria/cadastros/consultas/dados-publicos-cnpj). Most of the download solutions out there (e.g. [`got`](https://github.com/melbahja/got)) seem to be prepared for downloading large files, not for downloading from slow and unstable servers — which is the case at hand.
7169