Help us shape the future of Go! Take the 2026 Go Developer Survey

slicepool

package
v2.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMinCap

func GetMinCap[PoolT any, Cap constraints.Integer](pool *Pool[PoolT], minCap Cap) *[]PoolT

Types

type Pool

type Pool[T any] struct {
	// contains filtered or unexported fields
}

func (*Pool[T]) Get

func (me *Pool[T]) Get() (ret *[]T)

Get one of whatever is available. If there's no indication of required cap, then presumably pushing an item later will help raise the caps present in the pool.

func (*Pool[T]) Put

func (me *Pool[T]) Put(b *[]T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL