From 853a4de55bd7d50d8b35f10a50518f28f8206073 Mon Sep 17 00:00:00 2001 From: Mohamed Elbahja Date: Sun, 16 Aug 2020 12:12:55 +0100 Subject: [PATCH] fix: typos --- download.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/download.go b/download.go index 6253991..cfdeb72 100644 --- a/download.go +++ b/download.go @@ -107,7 +107,7 @@ func (d *Download) Init() (err error) { d.Concurrency = 20 } - // Set default min concurrency to 2. + // Set default min concurrency to 4. if d.Concurrency <= 2 { d.Concurrency = 4 } @@ -256,7 +256,7 @@ func (d *Download) Start() error { return nil } -// RunProgress runs ProgressFunc based on Interval and updates lastSize +// RunProgress runs ProgressFunc based on Interval and updates lastSize. func (d *Download) RunProgress(fn ProgressFunc) { // Set default interval. @@ -417,11 +417,11 @@ func (d *Download) merge(ctx context.Context) error { // Non-blocking chunk close. go chunk.Close() - // Sync dest file. - file.Sync() - // Put chunk in chunk pool ChunkPool.Put(&d.chunks[i]) + + // Sync dest file. + file.Sync() } return nil