diff --git a/src/compress/gzip/gzip.go b/src/compress/gzip/gzip.go index aafb442a667..0cc44c59e0f 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