1
0
buffer/pool.go

26 lines
322 B
Go
Raw Normal View History

2026-02-17 16:58:00 +01:00
package buffer
2026-02-22 16:30:37 +01:00
type noPool struct {
2026-02-17 16:58:00 +01:00
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) {
}