Documentation ¶
Overview ¶
Package langx provides small utility functions to extend the standard golang language.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Autoderef ¶
func Autoderef[T any](a *T) (zero T)
Autoderef safely converts a pointer to its value, uses the zero value for nil.
func DefaultIfZero ¶
func DefaultIfZero[T comparable](fallback T, v T) T
func DerefOrZero ¶
func DerefOrZero[T any](a *T) (zero T)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.