MSP-8172 Add vendor

This commit is contained in:
Синельник Тимур Романович committed 2026-07-29 12:52:27 +03:00
1 parent 5175d87e08
commit eb066cb055
2619 files changed
+757077 -2

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package httpcli
import (
"bytes"
"sync"
)
// nolint:gochecknoglobals,mnd
var (
bpool = sync.Pool{New: func() any {
return bytes.NewBuffer(make([]byte, 1024))
}}
)
func acquireBuffer() *bytes.Buffer {
buf := bpool.Get().(*bytes.Buffer) // nolint:forcetypeassert
buf.Reset()
return buf
}
func releaseBuffer(buf *bytes.Buffer) {
bpool.Put(buf)
}