Deref¶
func Deref[T any](ptr *T, def T) T
Deref dereferences ptr and returns the value it points to if not nil, or else returns def (the default value). This provides safe pointer dereferencing without nil checks.
func Deref[T any](ptr *T, def T) T
Deref dereferences ptr and returns the value it points to if not nil, or else returns def (the default value). This provides safe pointer dereferencing without nil checks.