]> Cypherpunks repositories - gostls13.git/commitdiff
compress/gzip: clarify behavior of Writer.Close
authorJoe Tsai <joetsai@digital-static.net>
Fri, 2 Jun 2017 00:31:24 +0000 (17:31 -0700)
committerJoe Tsai <thebrokentoaster@gmail.com>
Fri, 2 Jun 2017 01:03:19 +0000 (01:03 +0000)
Fixes #20551

Change-Id: Ia47cae14a26fe5f278ad7209218d083cc50a3ff8
Reviewed-on: https://go-review.googlesource.com/44572
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/compress/gzip/gzip.go

index aafb442a66747512ae1358c0ec47ac8a959de6b4..0cc44c59e0f5504303a15e5478491d6a917987ab 100644 (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