psanford / wormhole-william

End-to-end encrypted file transfer. A magic wormhole CLI and API in Go (golang).
MIT License
1.08k stars 55 forks source link

A few smaller code cleanups #35

Closed Jacalz closed 3 years ago

Jacalz commented 3 years ago

This PR incorporates a couple code cleanups, with some being more important than others. Below is a summary of what has been done:

Jacalz commented 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:

psanford commented 3 years ago

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.

Jacalz commented 3 years ago

Alright then. Will change this PR to only include the code cleanups :slightly_frowning_face:

Jacalz commented 3 years ago

Removed the io.Reader changes. Just some nice code cleanups now :slightly_smiling_face:

psanford commented 3 years ago

Lets not move the sendoptions out of send.go. Otherwise this looks good.

Jacalz commented 3 years ago

Sure thing. Should be ready for a re-review now :slightly_smiling_face:

Jacalz commented 3 years ago

Ping @psanford. Any chance that you can re-review this and #33?

psanford commented 3 years ago

Can you rebase and squash your commits?

Jacalz commented 3 years ago

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.

Jacalz commented 3 years ago

This is now rebased and squashed.