Skip to content

Commit

Permalink
Typos and docs edits
Browse files Browse the repository at this point in the history
  • Loading branch information
cuducos committed Aug 23, 2023
1 parent b6fff79 commit 9bb80b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion downloader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 9bb80b8

Please sign in to comment.