melbahja / got

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

Optimizations and refactoring #35

Closed renbou closed 2 years ago

renbou commented 2 years ago

Hi! Loved the idea of this tool, so I decided to contribute some improvements:

Not sure why, but the test workflows on go 1.14 windows are sometimes not passing (even though they are marked as ok, some unrelated errors are thrown by go vet, which makes the github CI workflow get marked as failed)

Didn't measure the optimizations on a server with good internet, but my local testing seems to save around 3+ seconds each time since we avoid file copying

renbou commented 2 years ago

The optimizations done here (concurrently writing to single file) also fix what has been mentioned in #32 (slow writing to disk), since now the fastest way possible is used

renbou commented 2 years ago

Also fixes all problems described in #29!

renbou commented 2 years ago

image This is what I was talking about - the tests pass as OK, but the action fails. Maybe it's time to update the actions to run tests on 1.16 and 1.17?

melbahja commented 2 years ago

it's fails only on 1.14.x windows, i think the tests gonna pass on 1.16 and 1.17

melbahja commented 2 years ago

Thank you for your valuable pr