fix golint issues in core/codec (#473)

This commit is contained in:
Kevin Wan
2021-02-18 14:11:09 +08:00
committed by GitHub
parent 9602494454
commit 8f1c88e07d
5 changed files with 32 additions and 4 deletions

View File

@@ -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 {