]> Cypherpunks repositories - gostls13.git/commitdiff
bufio: make it clear that the client must call Writer.Flush
authorRob Pike <r@golang.org>
Mon, 12 Aug 2013 02:55:33 +0000 (12:55 +1000)
committerRob Pike <r@golang.org>
Mon, 12 Aug 2013 02:55:33 +0000 (12:55 +1000)
Fixes #5530.

R=golang-dev, iant, com.liigo
CC=golang-dev
https://golang.org/cl/12688044

src/pkg/bufio/bufio.go

index a548fd3f719213039d06722f9ef734ac76464156..d1ff3c9edc16dead49f6d860c71a1a55dc23b192 100644 (file)
@@ -437,6 +437,9 @@ func (b *Reader) writeBuf(w io.Writer) (int64, error) {
 // Writer implements buffering for an io.Writer object.
 // If an error occurs writing to a Writer, no more data will be
 // accepted and all subsequent writes will return the error.
+// After all data has been written, the client should call the
+// Flush method to guarantee all data has been forwarded to
+// the underlying io.Writer.
 type Writer struct {
        err error
        buf []byte