Documentation
¶
Overview ¶
Package ptr contains the Ptr function
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ptr ¶
func Ptr[T any](val T) *T
Ptr takes an argument and returns a pointer to it this is useful when instantiating structs whose fields are pointers to basic types
func ValueOrZero ¶ added in v0.2.0
func ValueOrZero[T any](ptr *T) T
ValueOrZero returns the value of a pointer or the zero value if nil
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.