Get a buffer from the pool or allocate one
()
| 222 | |
| 223 | // Get a buffer from the pool or allocate one |
| 224 | func (bp *Pool) Get() []byte { |
| 225 | return bp.GetN(1)[0] |
| 226 | } |
| 227 | |
| 228 | // GetN get n buffers atomically from the pool or allocate them |
| 229 | func (bp *Pool) GetN(n int) [][]byte { |