Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PtrOrNil ¶
func PtrOrNil[T comparable](t T) *T
PtrOrNil returns a pointer to t if it has a non-empty value otherwise nil.
func ValueOrZero ¶
func ValueOrZero[T any](ptr *T) T
ValueOrZero returns the value that the pointer ptr pointers to. It returns the zero value if ptr is nil.
func Values ¶
func Values[K comparable, V any](m map[K]V) []V
Values returns a slice of values from m map.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.