Commit e63d2463 authored by JessonChan's avatar JessonChan

go test fixed

parent 499e2b59
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment