moved 'core' to 'internal'

This commit is contained in:
2023-08-23 18:16:24 -05:00
parent 74b68863b1
commit 458e907c99
28 changed files with 30 additions and 30 deletions

View File

@@ -0,0 +1,19 @@
package pool
import (
"bytes"
"sync"
)
var allocator = &sync.Pool{
New: func() any { return new(bytes.Buffer) },
}
func Get() *bytes.Buffer {
return allocator.Get().(*bytes.Buffer)
}
func Put(buf *bytes.Buffer) {
buf.Reset()
allocator.Put(buf)
}