Commit f46f3432 authored by Andrew Gerrand's avatar Andrew Gerrand

compress/{gzip,zlib}: mention that Close flushes

Our other CloseFlushers (archive/tar, compress/flate) do mention this.

The original change was accidentally submitted to the release branch:
        https://golang.org/cl/117430043/

TBR=rsc
R=r, rsc
CC=golang-codereviews
https://golang.org/cl/124130043
parent 897f7a31
......@@ -245,7 +245,8 @@ func (z *Writer) Flush() error {
return z.err
}
// Close closes the Writer. It does not close the underlying io.Writer.
// Close closes the Writer, flushing any unwritten data to the underlying
// io.Writer, but does not close the underlying io.Writer.
func (z *Writer) Close() error {
if z.err != nil {
return z.err
......
......@@ -174,7 +174,8 @@ func (z *Writer) Flush() error {
return z.err
}
// Calling Close does not close the wrapped io.Writer originally passed to NewWriter.
// Close closes the Writer, flushing any unwritten data to the underlying
// io.Writer, but does not close the underlying io.Writer.
func (z *Writer) Close() error {
if !z.wroteHeader {
z.err = z.writeHeader()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment