1
0
buffer/pool.go
2026-02-17 16:58:00 +01:00

26 lines
321 B
Go

package buffer
type noPool struct{
allocSize int
}
type pool struct{}
func newPool() *pool {
return &pool{}
}
func (p noPool) Get() ([]byte, error) {
return make([]byte, p.allocSize), nil
}
func (noPool) Put([]byte) {
}
func (p *pool) Get() ([]byte, error) {
return nil, nil
}
func (p *pool) Put(b []byte) {
}