Closed Jacalz closed 3 years ago
I just need to do a little optimization and removal of duplicated code. Should be able to move the seeking into the sendFileDirectory() function and only try to seek if we actually have provided a progressbar option. After that, I shall open this up for review :slightly_smiling_face:
The filesize is required as part of the protocol. It is sent in the offer and used by the receiver. I would not expect this to be compatible with any existing wormhole clients.
Alright then. Will change this PR to only include the code cleanups :slightly_frowning_face:
Removed the io.Reader
changes. Just some nice code cleanups now :slightly_smiling_face:
Lets not move the sendoptions out of send.go. Otherwise this looks good.
Sure thing. Should be ready for a re-review now :slightly_smiling_face:
Ping @psanford. Any chance that you can re-review this and #33?
Can you rebase and squash your commits?
Can you rebase and squash your commits?
Sure. I can get that done tomorrow. There does not seem to be any conflicts, so you should just be able to squash and merge through GitHub though, if you want to.
This is now rebased and squashed.
This PR incorporates a couple code cleanups, with some being more important than others. Below is a summary of what has been done:
io.TeeReader
andcountWriter
with the bytes written byio.Copy
(should be marginally faster than before).prefixPath
being recalculated on each directory iteration (should also result in a small performance improvement).variable = variable + number
tovariable += number
.