Documentation ¶
Index ¶
- Variables
- func Copy[M ~map[K]V, K comparable, V any](elements M) M
- func For[M ~map[K]V, K comparable, V any](elements M, walker func(c.KV[K, V]) error) error
- func ForEach[M ~map[K]V, K comparable, V any](elements M, walker func(c.KV[K, V]))
- func ForEachKey[M ~map[K]V, K comparable, V any](elements M, walker func(K))
- func ForEachOrdered[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(c.KV[K, V]))
- func ForEachOrderedValues[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(V))
- func ForEachValue[M ~map[K]V, K comparable, V any](elements M, walker func(V))
- func ForKeys[M ~map[K]V, K comparable, V any](elements M, walker func(K) error) error
- func ForOrdered[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(c.KV[K, V]) error) error
- func ForOrderedValues[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(V) error) error
- func ForValues[M ~map[K]V, K comparable, V any](elements M, walker func(V) error) error
- func Keys[M ~map[K]V, K comparable, V any](elements M) []K
- func ToString[M ~map[K]V, K comparable, V any](elements M) string
- func ToStringOrdered[M ~map[K]V, K comparable, V any](order []K, elements M) string
- func ToStringOrderedf[M ~map[K]V, K comparable, V any](order []K, elements M, kvFormat, delim string) string
- func ToStringf[M ~map[K]V, K comparable, V any](elements M, kvFormat, delim string) string
- func Track[M ~map[K]V, K comparable, V any](elements M, tracker func(K, V) error) error
- func TrackEach[M ~map[K]V, K comparable, V any](elements M, tracker func(K, V))
- func TrackEachOrdered[M ~map[K]V, K comparable, V any](elements []K, uniques M, tracker func(K, V))
- func TrackOrdered[M ~map[K]V, K comparable, V any](order []K, uniques M, tracker func(K, V) error) error
Constants ¶
This section is empty.
Variables ¶
var ErrBreak = it.ErrBreak
ErrBreak is For, Track breaker
Functions ¶
func For ¶
For applies a walker for every key/value pairs from a map. Key/value pair is boxed to the KV. To stop walking just return the ErrBreak.
func ForEach ¶
func ForEach[M ~map[K]V, K comparable, V any](elements M, walker func(c.KV[K, V]))
ForEach applies a walker for every key/value pairs from a map. Key/value pair is boxed to the KV.
func ForEachKey ¶
func ForEachKey[M ~map[K]V, K comparable, V any](elements M, walker func(K))
ForEachKey applies a walker for every key from a map.
func ForEachOrdered ¶
func ForEachOrdered[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(c.KV[K, V]))
ForEachOrdered applies a walker for every key/value pairs from a map in order. Key/value pair is boxed to the KV.
func ForEachOrderedValues ¶
func ForEachOrderedValues[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(V))
ForEachOrderedValues applies a walker for every value from a map in order.
func ForEachValue ¶
func ForEachValue[M ~map[K]V, K comparable, V any](elements M, walker func(V))
ForEachValue applies a walker for every value from a map.
func ForKeys ¶
func ForKeys[M ~map[K]V, K comparable, V any](elements M, walker func(K) error) error
ForKeys applies a walker for every key from a map. To stop walking just return the ErrBreak.
func ForOrdered ¶
func ForOrdered[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(c.KV[K, V]) error) error
ForOrdered applies a walker for every key/value pairs from a map in order. Key/value pair is boxed to the KV. To stop walking just return the ErrBreak.
func ForOrderedValues ¶
func ForOrderedValues[M ~map[K]V, K comparable, V any](elements []K, uniques M, walker func(V) error) error
ForOrderedValues applies a walker for every value from a map in order. To stop walking just return the ErrBreak.
func ForValues ¶
func ForValues[M ~map[K]V, K comparable, V any](elements M, walker func(V) error) error
ForValues applies a walker for every value from a map. To stop walking just return the ErrBreak.
func Keys ¶
func Keys[M ~map[K]V, K comparable, V any](elements M) []K
Keys makes a slice of map keys.
func ToString ¶
func ToString[M ~map[K]V, K comparable, V any](elements M) string
ToString converts elements to the string representation.
func ToStringOrdered ¶
func ToStringOrdered[M ~map[K]V, K comparable, V any](order []K, elements M) string
ToStringOrdered converts elements to the string representation according to the order.
func ToStringOrderedf ¶
func ToStringOrderedf[M ~map[K]V, K comparable, V any](order []K, elements M, kvFormat, delim string) string
ToStringOrderedf converts elements to a string representation using a key/value pair format and a delimeter. In order.
func ToStringf ¶
func ToStringf[M ~map[K]V, K comparable, V any](elements M, kvFormat, delim string) string
ToStringf converts elements to a string representation using a key/value pair format and a delimeter.
func Track ¶
func Track[M ~map[K]V, K comparable, V any](elements M, tracker func(K, V) error) error
Track applies a tracker for every key/value pairs from a map. To stop traking just return the ErrBreak.
func TrackEach ¶
func TrackEach[M ~map[K]V, K comparable, V any](elements M, tracker func(K, V))
TrackEach applies a tracker for every key/value pairs from a map.
func TrackEachOrdered ¶
func TrackEachOrdered[M ~map[K]V, K comparable, V any](elements []K, uniques M, tracker func(K, V))
TrackEachOrdered applies a tracker for every key/value pairs from a map in order.
func TrackOrdered ¶
func TrackOrdered[M ~map[K]V, K comparable, V any](order []K, uniques M, tracker func(K, V) error) error
TrackOrdered applies a tracker for every key/value pairs from a map in order. To stop traking just return the ErrBreak.
Types ¶
This section is empty.