package
Version:
v1.0.3
Opens a new window with list of versions in this module.
Published: Sep 15, 2025
License: Unlicense
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
View Source
const (
BufferSize = units.Kb
)
Put returns a buffer to the pool.
Buffers should be returned to the pool when no longer needed to allow reuse.
PutBytes returns a buffer was not necessarily created by Get().
Get returns a buffer from the pool or creates a new one if the pool is empty.
Example usage:
buf := bufpool.Get()
defer bufpool.Put(buf)
// Use buf...
func (b B) ToBytes() []byte
Source Files
¶
Click to show internal directories.
Click to hide internal directories.