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 MakePtrOrNil ¶ added in v2.3.1
func MakePtrOrNil[T comparable](value T) *T
MakePtrOrNil returns a pointer only when value is not empty. Otherwise Atlas versioned API interprets a pointer to an empty value as not empty.
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.