fix golint issues in core/codec (#473)
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
const unzipLimit = 100 * 1024 * 1024 // 100MB
|
||||
|
||||
// Gzip compresses bs.
|
||||
func Gzip(bs []byte) []byte {
|
||||
var b bytes.Buffer
|
||||
|
||||
@@ -18,6 +19,7 @@ func Gzip(bs []byte) []byte {
|
||||
return b.Bytes()
|
||||
}
|
||||
|
||||
// Gunzip uncompresses bs.
|
||||
func Gunzip(bs []byte) ([]byte, error) {
|
||||
r, err := gzip.NewReader(bytes.NewBuffer(bs))
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user