From 6b706cf50d128cd49192d4815bc25fec06514fe8 Mon Sep 17 00:00:00 2001 From: Rob Pike <r@golang.org> Date: Mon, 12 Aug 2013 12:55:33 +1000 Subject: [PATCH] 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 --- src/pkg/bufio/bufio.go | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.30.9