Documentation ¶
Overview ¶
ds provides data structure helper functions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureFilled ¶
func EnsureFilled[T any, PT *T](ts []PT)
EnsureFilled accepts a slice of pointers and allocates a zero value for any element that is nil.
func EnsureFilledSize ¶
EnsureFilledSize accepts a slice of pointers, resizes it to ensure it has length at least size, and allocates zero values for any nil elements.
func EnsureSize ¶
EnsureSize grows the provided slice to ensure it has length size and returns the result. It may or may not have capacity greater than size.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.