package
Version:
v0.1.21
Opens a new window with list of versions in this module.
Published: Jul 26, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ptr contains helpers to create pointers to various types.
func Deref[T any](ptr *T, def T) T
Deref dereferences the given pointer, or returns
a default value if the pointer is nil.
To returns a pointer to the given type. Useful for initializing
a reference from a primitive constant. e.g. a := ptr.To(100)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.