Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deref ¶
func Deref[T any](v *T) T
Deref will return the referenced value, or if the pointer has no value, then it returns with the zero value.
Example ¶
package main import ( "go.llib.dev/frameless/pkg/pointer" ) type ExampleStruct struct { StrPtrField *string IntPtrField *int } func main() { var es ExampleStruct _ = pointer.Deref(es.StrPtrField) _ = pointer.Deref(es.IntPtrField) }
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.