From a98191f43560ea2ddbbf848c1c727daeed2e39ae Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Thu, 13 Oct 2016 13:01:41 +0300 Subject: [PATCH] Use standard compress/* packages instead of github.com/klauspost/compress/* The reasons are: - @klauspost optimized standard packages in go1.7+ - This removes an external dependency from fasthttp --- compress.go | 7 +++---- fs.go | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/compress.go b/compress.go index c3b81cf..8747de1 100644 --- a/compress.go +++ b/compress.go @@ -1,14 +1,13 @@ package fasthttp import ( + "compress/flate" + "compress/gzip" + "compress/zlib" "fmt" "io" "os" "sync" - - "github.com/klauspost/compress/flate" - "github.com/klauspost/compress/gzip" - "github.com/klauspost/compress/zlib" ) // Supported compression levels. diff --git a/fs.go b/fs.go index c36073d..dc79dfc 100644 --- a/fs.go +++ b/fs.go @@ -2,6 +2,7 @@ package fasthttp import ( "bytes" + "compress/gzip" "errors" "fmt" "html" @@ -15,8 +16,6 @@ import ( "strings" "sync" "time" - - "github.com/klauspost/compress/gzip" ) // ServeFileBytesUncompressed returns HTTP response containing file contents