melbahja / got

Got: Simple golang package and CLI tool to download large files faster 🏃 than cURL and Wget!
MIT License
714 stars 45 forks source link

Refactoring #13

Closed CodeLieutenant closed 4 years ago

CodeLieutenant commented 4 years ago

1 . Refactoring ints to uints, allowing larger payloads to be downloaded

  1. Avoiding unnecessary allocation for Chunks slice (changing it from []*Chung to []Chunk)
  2. Avoiding copies of Chunk slice by preallocating the buffer
  3. Adding file remove on fail
  4. Removing pointer from Info in Download struct, (structural composition) it makes code a little bit cleaner
melbahja commented 4 years ago

looks good thank you