1
0
mirror of https://github.com/golang/go synced 2024-11-23 20:10:08 -07:00

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 <iant@golang.org>
This commit is contained in:
Joe Tsai 2017-06-01 17:31:24 -07:00 committed by Joe Tsai
parent da1b83067d
commit cba4b41671

View File

@ -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