store stores buf, an updated buffer, if its suitable to do so.
(buf []byte)
| 143 | |
| 144 | // store stores buf, an updated buffer, if its suitable to do so. |
| 145 | func (b *buffer) store(buf []byte) { |
| 146 | if cap(buf) <= maxCachedBufSize && cap(buf) > cap(b.cachedBuf) { |
| 147 | b.cachedBuf = buf[:cap(buf)] |
| 148 | } |
| 149 | } |