Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtendCapacity ¶
ExtendCapacity returns a with the capacity extended to len(a)+itemsToAdd.
It may allocate new slice if cap(a) is smaller than len(a)+itemsToAdd.
Types ¶
type Buffer ¶ added in v1.110.22
type Buffer[T any] struct { // B is the underlying T slice. B []T }
Buffer implements a simple buffer for T.
type BufferPool ¶ added in v1.110.22
type BufferPool[T any] struct { // contains filtered or unexported fields }
BufferPool is a pool of T Buffers.
func (*BufferPool[T]) Get ¶ added in v1.110.22
func (bp *BufferPool[T]) Get() *Buffer[T]
Get obtains a Buffer from bp.
func (*BufferPool[T]) Put ¶ added in v1.110.22
func (bp *BufferPool[T]) Put(b *Buffer[T])
Put puts b into bp.
Click to show internal directories.
Click to hide internal directories.