From 5ef12adb7b5cb6f13389e35f9616b60520107112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Vicente=20Gon=C3=A7alves?= <4732915+cuducos@users.noreply.github.com> Date: Mon, 13 Nov 2023 13:58:28 -0500 Subject: [PATCH] Typos --- downloader.go | 9 +++++---- downloader_test.go | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/downloader.go b/downloader.go index 487c2b2..13fe841 100644 --- a/downloader.go +++ b/downloader.go @@ -54,7 +54,7 @@ func (s *DownloadStatus) IsFinished() bool { // Downloader can be configured by the user before starting the download using // the following fields. This configurations impacts how the download will be -// handled, including retries, amoutn of requets, and size of each request, for +// handled, including retries, amount of requests, and size of each request, for // example. type Downloader struct { // OutputDir is where the downloaded files will be saved. If not set, @@ -76,7 +76,8 @@ type Downloader struct { // MaxParallelDownloadsPerServer controls the max number of concurrent // connections opened to the same server. If all the URLs are from the same // server this is the total of concurrent connections. If the user is downloading - // files from different servers, this limit is applied to each server idependently. + // files from different servers, this limit is applied to each server + // independently. ConcurrencyPerServer int // MaxRetriesPerChunk is the maximum amount of retries for each HTTP request @@ -94,7 +95,7 @@ type Downloader struct { WaitRetry time.Duration // RestartDownloads controls whether or not to continue the download of - // previous download attempts, skipping chunks alreadt downloaded. + // previous download attempts, skipping chunks already downloaded. RestartDownloads bool // ProgressDir is the directory where Chunk keeps track of each chunk @@ -348,7 +349,7 @@ func (d *Downloader) Download(urls ...string) <-chan DownloadStatus { return d.DownloadWithContext(context.Background(), urls...) } -// NewDownloader creates a downloader with the defalt configuration. Check +// NewDownloader creates a downloader with the default configuration. Check // the constants in this package for their values. func DefaultDownloader() *Downloader { dir, err := os.Getwd() diff --git a/downloader_test.go b/downloader_test.go index 77aedd0..a0c7928 100644 --- a/downloader_test.go +++ b/downloader_test.go @@ -166,7 +166,7 @@ func TestDownload_ZIPArchive(t *testing.T) { t.Errorf("expected no error reading archived file, got %s", err) } if !bytes.Equal(expected, b.Bytes()) { - t.Error("archived contents differ from expected") // not printing becasuse it's a lot of data + t.Error("archived contents differ from expected") // not printing because it's a lot of data } }