feature(buffers): add buffers

This commit is contained in:
pyihe
2022-08-05 17:56:18 +08:00
parent 2b15311f1e
commit b70a3af443
2 changed files with 35 additions and 12 deletions

View File

@@ -5,18 +5,6 @@ import (
"unsafe"
"github.com/pyihe/go-pkg/errors"
"github.com/valyala/bytebufferpool"
)
type ByteBuffer = bytebufferpool.ByteBuffer
var (
Get = bytebufferpool.Get
Put = func(b *ByteBuffer) {
if b != nil {
bytebufferpool.Put(b)
}
}
)
func Int64(b []byte) (v int64, err error) {