From e63d24637dfd56eabd9067a2bcf824de66f92d07 Mon Sep 17 00:00:00 2001 From: JessonChan Date: Tue, 15 Dec 2015 14:08:58 +0800 Subject: [PATCH] go test fixed --- staticfile_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/staticfile_test.go b/staticfile_test.go index e635fcc6..097ee07e 100644 --- a/staticfile_test.go +++ b/staticfile_test.go @@ -4,6 +4,7 @@ import ( "bytes" "compress/flate" "compress/gzip" + "compress/zlib" "io" "io/ioutil" "os" @@ -43,7 +44,7 @@ func TestOpenStaticFileGzip_1(t *testing.T) { func TestOpenStaticFileDeflate_1(t *testing.T) { file, _ := os.Open(licenseFile) var zipBuf bytes.Buffer - fileWriter, _ := flate.NewWriter(&zipBuf, flate.BestCompression) + fileWriter, _ := zlib.NewWriterLevel(&zipBuf, flate.BestCompression) io.Copy(fileWriter, file) fileWriter.Close() content, _ := ioutil.ReadAll(&zipBuf)