()
| 27 | } |
| 28 | |
| 29 | func NewBufPool() *BufPool { |
| 30 | return &BufPool{ |
| 31 | pool: &sync.Pool{ |
| 32 | New: func() any { |
| 33 | return new(bytes.Buffer) |
| 34 | }, |
| 35 | }, |
| 36 | } |
| 37 | } |
| 38 | |
| 39 | func (b *BufPool) Get() *bytes.Buffer { |
| 40 | return b.pool.Get().(*bytes.Buffer) |
no outgoing calls
no test coverage detected