News for hackers. Stuff that matters.
Re:Goroutines, Nonblocking I/O, and Memory Usage by vendakka on Thursday January 05, 2017 @05:09PM (#13331898)
I wasn't very clear. A hypothetical conn.Read(w Writer) would call Write on w instead of filling a byte array. Write in turn allocates as needed. WriterTo is a cleaner way of doing this.
Re:Goroutines, Nonblocking I/O, and Memory Usage by masklinn on Thursday January 05, 2017 @05:13PM (#13331925)
> A hypothetical conn.Read(w Writer) would call Write on w instead of filling a byte array.

Yes I understand the purpose — hence suggesting WriterTo which is supposed to do that — I simply noted that conn.Read(w Writer) would make Conn not extend io.Reader anymore since it takes a buffer.

Re:Goroutines, Nonblocking I/O, and Memory Usage by vendakka on Thursday January 05, 2017 @11:12PM (#13333866)
Ah right.