Involved Source Files Package pool provides internal pool utilities.
Package-Level Type Names (only one)
/* sort by: | */
Type Parameters:
T: any A Pool is a generic wrapper around [sync.Pool] to provide strongly-typed
object pooling.
Note that SA6002 (ref: https://staticcheck.io/docs/checks/#SA6002) will
not be detected, so all internal pool use must take care to only store
pointer types. Get gets a T from the pool, or creates a new one if the pool is empty. Put returns x into the pool.
func New[T](fn func() T) *Pool[T]
Package-Level Functions (only one)
Type Parameters:
T: any New returns a new [Pool] for T, and will use fn to construct new Ts when
the pool is empty.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.