From 0dc145da1af53b3d44bb24cbba7afe3102a7102f Mon Sep 17 00:00:00 2001 From: vicanso Date: Fri, 8 Mar 2019 21:18:49 +0800 Subject: [PATCH] fix: add gzip close error --- gzip.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gzip.go b/gzip.go index ab48e7c..a2931f7 100644 --- a/gzip.go +++ b/gzip.go @@ -54,6 +54,9 @@ func doGzip(buf []byte, level int) ([]byte, error) { if err != nil { return nil, err } - w.Close() + err = w.Close() + if err != nil { + return nil, err + } return b.Bytes(), nil }