"Correct" way to chain writers together?
Ziggit
"Correct" way to chain writers together?
So I’m downloading a file via std.http.Client and I want to print out the progress as bytes are downloaded, and additionally write those bytes to a file. Essentially what I want is a version of stream that works for Writer → Writer. For now, I have a wrapper writer that copies the buffer state of the file writer. This way, the Writer interface sees a non-empty buffer, and I don’t have to go through the interface twice (as compared to calling writeAll on the file writer from inside drain). As ...
0 comments
No comments yet.