diff options
author | Joe Tsai <joetsai@digital-static.net> | 2017-06-01 17:31:24 -0700 |
---|---|---|
committer | Joe Tsai <thebrokentoaster@gmail.com> | 2017-06-02 01:03:19 +0000 |
commit | cba4b416719f7019ecc01a02d8efbf0c9c0e5df9 (patch) | |
tree | 261274558643d23814fb568938cf409f5db59e0c /src/compress | |
parent | da1b83067dfe554ba1c3de564bc4e6a1f1a9bdb0 (diff) | |
download | go-cba4b416719f7019ecc01a02d8efbf0c9c0e5df9.tar.gz go-cba4b416719f7019ecc01a02d8efbf0c9c0e5df9.zip |
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>
Diffstat (limited to 'src/compress')
-rw-r--r-- | src/compress/gzip/gzip.go | 5 |
1 files changed, 3 insertions, 2 deletions
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 |