diff --git a/util/pack/pack.go b/util/pack/pack.go index 6dc9daef..73e4108a 100644 --- a/util/pack/pack.go +++ b/util/pack/pack.go @@ -36,7 +36,7 @@ func Encode(src interface{}) (dst []byte) { // Decode decodes a CORK into a data object. func Decode(src []byte, dst interface{}) { - buf := bytes.NewBuffer(src) + buf := bytes.NewReader(src) cork.NewDecoder(buf).Options(&opt).Decode(dst) return }