-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File Stream - Support multi-writers #58
Conversation
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.
I also think that it worth writing a unit test for the asyncMultiWriter
.
io/multiwriter.go
Outdated
"golang.org/x/sync/errgroup" | ||
) | ||
|
||
var ErrShortWrite = errors.New("short write") |
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.
What is short write?
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.
Changed to
"The number of bytes written is less than the length of the input"
Allow the option to split a multipart file into two or more separate files. Without using a multi-writer setup, it's tricky to do this because once we've taken the content from the body and written it to one file, we can't write it to another since it's already been used up.