🧱 Chunk is a download manager for slow and unstable servers
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Typos and docs edits

+3 -3
+1 -1
downloader.go
··· 296 296 defer urlDownload.Done() 297 297 b, err := d.downloadChunk(ctx, url, c) 298 298 if err != nil { 299 - s.Error = fmt.Errorf("error downloadinf chunk #%d: %w", idx+1, err) 299 + s.Error = fmt.Errorf("error downloading chunk #%d: %w", idx+1, err) 300 300 ch <- s 301 301 return 302 302 }
+2 -2
progress.go
··· 16 16 // default. It can be replaced by the environment variable CHUNK_DIR. 17 17 const DefaultChunkDir = ".chunk" 18 18 19 - // get the chunk directory under user's home directory 19 + // get the chunk directory under user's home directory or using the envvar 20 20 func getChunkProgressDir(dir string) (string, error) { 21 21 if dir == "" { 22 22 dir = os.Getenv("CHUNK_DIR") ··· 46 46 Chunks []int64 47 47 } 48 48 49 - // trues to loads a download progress from a file 49 + // it loads a download progress from a file if restart is set to false 50 50 func (p *progress) load(restart bool) error { 51 51 p.lock.Lock() 52 52 defer p.lock.Unlock()