Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
type Pool[T any] struct { New func() T Prepare func(v T) T // contains filtered or unexported fields }
Pool is a generic wrapped over sync.Pool, that also allows for a prepare function to be called on the value before it is returned.
Click to show internal directories.
Click to hide internal directories.