Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SafeDereference ¶
func SafeDereference[T any](ptr *T) T
SafeDereference return the value ptr points to. If ptr is nil, it returns the default value if the type instead.
func ToNullablePtr ¶ added in v0.13.0
func ToNullablePtr[T comparable](val T) *T
ToNullablePtr converts a value to a pointer. If the passed value is the zero value of its type, it returns nil.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.