-
-
Notifications
You must be signed in to change notification settings - Fork 390
Add Read and Write methods to Archiver interface that accept io.Reader/io.Writer. #43
Conversation
…r/io.Writer. 1. Adds methods to interface. 2. Implement methods for each format. 3. Reimplement Make/Open so that code is shared.
// Write writes an archive to a Writer. | ||
Write(output io.Writer, sources []string) error | ||
// Read reads an archive from a Reader. | ||
Read(input io.Reader, destination string) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apicompat: breaking change members added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good bot 🐕
|
||
// symmetricTest compares the contents of a destination directory to the contents | ||
// of the test corpus and tests that they are equal. | ||
func symmetricTest(t *testing.T, name, dest string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unparam: name is unused
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed by next commit.
… os.RemoveAll I accidentally left commented out.
Open(source, destination string) error | ||
// Write writes an archive to a Writer. | ||
Write(output io.Writer, sources []string) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
apicompat: breaking change members added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR! Sorry it took me a while to get to this. The change looks thorough, and the interface changes are acceptable; probably about what I would have done. Error checking and formatting looks good... tests check out... so, thanks!
this broke multipart rar files ... |
This intended to implement a solution to issue #20.