Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValOrDefault
deprecated
func ValOrDefault[T comparable](val, defaultVal T) T
ValOrDefault returns the given value if it's non-zero, and otherwise returns the default.
Deprecated: Use `cmp.Or` instead. This function will be removed in a near future version.
func ValOrDefaultFunc ¶
func ValOrDefaultFunc[T comparable](val T, defaultFunc func() T) T
ValOrDefaultFunc returns the given value if it's non-zero, and otherwise invokes defaultFunc to produce a default value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.