From: Rob Pike Date: Mon, 12 Aug 2013 02:55:33 +0000 (+1000) Subject: bufio: make it clear that the client must call Writer.Flush X-Git-Tag: go1.2rc2~662 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6b706cf50d128cd49192d4815bc25fec06514fe8;p=gostls13.git bufio: make it clear that the client must call Writer.Flush Fixes #5530. R=golang-dev, iant, com.liigo CC=golang-dev https://golang.org/cl/12688044 --- diff --git a/src/pkg/bufio/bufio.go b/src/pkg/bufio/bufio.go index a548fd3f71..d1ff3c9edc 100644 --- a/src/pkg/bufio/bufio.go +++ b/src/pkg/bufio/bufio.go @@ -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