Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDefault ¶
func GetDefault[T comparable](value, fallback T) T
GetDefault returns the value if it is not the zero value of the type, otherwise it returns the fallback.
func GetDefaultPtr ¶
func GetDefaultPtr[T any](value *T, fallback T) T
GetDefaultPtr returns the value if it is not nil, otherwise it returns the fallback.
Types ¶
Click to show internal directories.
Click to hide internal directories.