Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Compare ¶
func Compare[T comparable](ptr1, ptr2 *T) bool
func CompareF ¶
CompareF compares two types using their pointers. Values passed to compare func never take nil/zero vales.
func Def ¶
func Def[R any](val R) R
Def behaves as Or(val, *new(R)), so it returns default value if value is not present or types are different
func Do ¶
func Do[T any](ptr *T, do func(v T) *T) *T
Do safely executes function 'do' in case ptr is not nil or returns 'nil' otherwise.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.