Documentation ¶
Index ¶
- func Always[T any](value T) func() T
- func IfNotNil[From any, To any](value *From, mapper func(*From) To) To
- func IfNotNilP[From any, To any](value *From, mapper func(*From) To) *To
- func Map[From any, To any](from []From, mapper func(From) To) []To
- func MapValuesErr[From any, To any](from map[string]From, mapper func(From) (To, error)) (map[string]To, error)
- func Ternary[Value any](r bool, trueF func() Value, falseF func() Value) Value
- func WrapF[From any, To any](applier func(From) To, from From) func() To
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IfNotNil ¶
IfNotNil apply the mapper func if the value is not nil returns zero value otherwise.
func MapValuesErr ¶
func MapValuesErr[From any, To any](from map[string]From, mapper func(From) (To, error)) (map[string]To, error)
MapValues transform map values by applying mapper func.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.