package
Version:
v0.3.0
Opens a new window with list of versions in this module.
Published: Oct 25, 2026
License: MIT
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 mapper transforms values and collections with explicit mapping functions.
func Map[In any, Out any](
in *In,
fn func(*In) Out,
) Out
Map maps a non-nil input; nil returns the output zero value without calling fn.
MapGroups maps each named group while preserving its key and item order.
func MapSlice[In any, Out any](
items []*In,
fn Func[*In, Out],
) []Out
MapSlice preserves order and maps nil entries to output zero values.
type Func[In any, Out any] func(In) Out
Func maps one input to an output.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.