Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetOrDefault ¶
func GetOrDefault[T any](ptr *T, defaultValue T) T
GetOrDefault returns the value of a pointer or a default value
func GetOrNilIfEmpty ¶ added in v2.2.1
func GetOrNilIfEmpty[T any](val []T) *[]T
func SetOrNil ¶
func SetOrNil[T comparable](val T, defaultValue T) *T
SetOrNil returns the address of the given value or nil if it equals defaultValue
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.