Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ZeroDefault ¶ added in v1.10.0
func ZeroDefault[T comparable](v T, def T) T
ZeroDefault returns the default value if the given value is zero, otherwise it returns the value.
Parameters: - v: The value to check. - def: The default value to return if v is zero.
Returns: - The default value if v is zero, otherwise the value.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.