package
module
Version:
v2.0.0-...-3c338e2
Opens a new window with list of versions in this module.
Published: Dec 15, 2022
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
pointer
Pointer package provides functions for value-to-pointer/pointer-to-value conversions.
Documentation
¶
func Coalesce[T any](fallback T, values ...*T) T
Coalesce returns the first non-nil value in a list (or fallback value when all nils).
func New[T any](val T) *T
New returns a new pointer to provided value.
func Unpoint(v interface{}) interface{}
Unpoint returns actual value of the pointers
func Value[T any](ptr *T) (T, bool)
Value returns pointer value and true if not nil or zero value and false.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.