From 9bb80b84ea7bef48188dae2627ab198fb6f01b9b Mon Sep 17 00:00:00 2001 From: Eduardo Cuducos <4732915+cuducos@users.noreply.github.com> Date: Wed, 23 Aug 2023 12:22:59 -0400 Subject: [PATCH] Typos and docs edits --- downloader.go | 2 +- progress.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/downloader.go b/downloader.go index 35f0ab9..c2905fa 100644 --- a/downloader.go +++ b/downloader.go @@ -296,7 +296,7 @@ func (d *Downloader) prepareAndStartDownload(ctx context.Context, url string, ch defer urlDownload.Done() b, err := d.downloadChunk(ctx, url, c) if err != nil { - s.Error = fmt.Errorf("error downloadinf chunk #%d: %w", idx+1, err) + s.Error = fmt.Errorf("error downloading chunk #%d: %w", idx+1, err) ch <- s return } diff --git a/progress.go b/progress.go index 5dd8a71..30e962c 100644 --- a/progress.go +++ b/progress.go @@ -16,7 +16,7 @@ import ( // default. It can be replaced by the environment variable CHUNK_DIR. const DefaultChunkDir = ".chunk" -// get the chunk directory under user's home directory +// get the chunk directory under user's home directory or using the envvar func getChunkProgressDir(dir string) (string, error) { if dir == "" { dir = os.Getenv("CHUNK_DIR") @@ -46,7 +46,7 @@ type progress struct { Chunks []int64 } -// trues to loads a download progress from a file +// it loads a download progress from a file if restart is set to false func (p *progress) load(restart bool) error { p.lock.Lock() defer p.lock.Unlock()