Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/goPublic

Commit329d3ce

Browse files
committed
compress/{gzip,zlib}: mention that Close flushes
Our other CloseFlushers (archive/tar, compress/flate) do mention this.LGTM=dave, rR=r, daveCC=golang-codereviewshttps://golang.org/cl/117430043
1 parent5743562 commit329d3ce

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/pkg/compress/gzip/gzip.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ func (z *Writer) Flush() error {
245245
returnz.err
246246
}
247247

248-
// Close closes the Writer. It does not close the underlying io.Writer.
248+
// Close closes the Writer, flushing any unwritten data to the underlying
249+
// io.Writer, but does not close the underlying io.Writer.
249250
func (z*Writer)Close()error {
250251
ifz.err!=nil {
251252
returnz.err

‎src/pkg/compress/zlib/writer.go‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ func (z *Writer) Flush() error {
174174
returnz.err
175175
}
176176

177-
// Calling Close does not close the wrapped io.Writer originally passed to NewWriter.
177+
// Close closes the Writer, flushing any unwritten data to the underlying
178+
// io.Writer, but does not close the underlying io.Writer.
178179
func (z*Writer)Close()error {
179180
if!z.wroteHeader {
180181
z.err=z.writeHeader()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp