From: Joe Tsai Date: Fri, 2 Jun 2017 00:31:24 +0000 (-0700) Subject: compress/gzip: clarify behavior of Writer.Close X-Git-Tag: go1.9beta1~131 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=cba4b416719f7019ecc01a02d8efbf0c9c0e5df9;p=gostls13.git compress/gzip: clarify behavior of Writer.Close Fixes #20551 Change-Id: Ia47cae14a26fe5f278ad7209218d083cc50a3ff8 Reviewed-on: https://go-review.googlesource.com/44572 Reviewed-by: Ian Lance Taylor --- diff --git a/src/compress/gzip/gzip.go b/src/compress/gzip/gzip.go index aafb442a66..0cc44c59e0 100644 --- a/src/compress/gzip/gzip.go +++ b/src/compress/gzip/gzip.go @@ -222,8 +222,9 @@ func (z *Writer) Flush() error { return z.err } -// Close closes the Writer, flushing any unwritten data to the underlying -// io.Writer, but does not close the underlying io.Writer. +// Close closes the Writer by flushing any unwritten data to the underlying +// io.Writer and writing the GZIP footer. +// It does not close the underlying io.Writer. func (z *Writer) Close() error { if z.err != nil { return z.err