🧱 Chunk is a download manager for slow and unstable servers
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Typos

+6 -5
+5 -4
downloader.go
··· 54 54 55 55 // Downloader can be configured by the user before starting the download using 56 56 // the following fields. This configurations impacts how the download will be 57 - // handled, including retries, amoutn of requets, and size of each request, for 57 + // handled, including retries, amount of requests, and size of each request, for 58 58 // example. 59 59 type Downloader struct { 60 60 // OutputDir is where the downloaded files will be saved. If not set, ··· 76 76 // MaxParallelDownloadsPerServer controls the max number of concurrent 77 77 // connections opened to the same server. If all the URLs are from the same 78 78 // server this is the total of concurrent connections. If the user is downloading 79 - // files from different servers, this limit is applied to each server idependently. 79 + // files from different servers, this limit is applied to each server 80 + // independently. 80 81 ConcurrencyPerServer int 81 82 82 83 // MaxRetriesPerChunk is the maximum amount of retries for each HTTP request ··· 94 95 WaitRetry time.Duration 95 96 96 97 // RestartDownloads controls whether or not to continue the download of 97 - // previous download attempts, skipping chunks alreadt downloaded. 98 + // previous download attempts, skipping chunks already downloaded. 98 99 RestartDownloads bool 99 100 100 101 // ProgressDir is the directory where Chunk keeps track of each chunk ··· 348 349 return d.DownloadWithContext(context.Background(), urls...) 349 350 } 350 351 351 - // NewDownloader creates a downloader with the defalt configuration. Check 352 + // NewDownloader creates a downloader with the default configuration. Check 352 353 // the constants in this package for their values. 353 354 func DefaultDownloader() *Downloader { 354 355 dir, err := os.Getwd()
+1 -1
downloader_test.go
··· 166 166 t.Errorf("expected no error reading archived file, got %s", err) 167 167 } 168 168 if !bytes.Equal(expected, b.Bytes()) { 169 - t.Error("archived contents differ from expected") // not printing becasuse it's a lot of data 169 + t.Error("archived contents differ from expected") // not printing because it's a lot of data 170 170 } 171 171 } 172 172