···54545555// Downloader can be configured by the user before starting the download using
5656// the following fields. This configurations impacts how the download will be
5757-// handled, including retries, amoutn of requets, and size of each request, for
5757+// handled, including retries, amount of requests, and size of each request, for
5858// example.
5959type Downloader struct {
6060 // OutputDir is where the downloaded files will be saved. If not set,
···7676 // MaxParallelDownloadsPerServer controls the max number of concurrent
7777 // connections opened to the same server. If all the URLs are from the same
7878 // server this is the total of concurrent connections. If the user is downloading
7979- // files from different servers, this limit is applied to each server idependently.
7979+ // files from different servers, this limit is applied to each server
8080+ // independently.
8081 ConcurrencyPerServer int
81828283 // MaxRetriesPerChunk is the maximum amount of retries for each HTTP request
···9495 WaitRetry time.Duration
95969697 // RestartDownloads controls whether or not to continue the download of
9797- // previous download attempts, skipping chunks alreadt downloaded.
9898+ // previous download attempts, skipping chunks already downloaded.
9899 RestartDownloads bool
99100100101 // ProgressDir is the directory where Chunk keeps track of each chunk
···348349 return d.DownloadWithContext(context.Background(), urls...)
349350}
350351351351-// NewDownloader creates a downloader with the defalt configuration. Check
352352+// NewDownloader creates a downloader with the default configuration. Check
352353// the constants in this package for their values.
353354func DefaultDownloader() *Downloader {
354355 dir, err := os.Getwd()
+1-1
downloader_test.go
···166166 t.Errorf("expected no error reading archived file, got %s", err)
167167 }
168168 if !bytes.Equal(expected, b.Bytes()) {
169169- t.Error("archived contents differ from expected") // not printing becasuse it's a lot of data
169169+ t.Error("archived contents differ from expected") // not printing because it's a lot of data
170170 }
171171}
172172