Documentation ¶
Overview ¶
Package collections contains useful functions for working with collections
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateKey = errors.New("duplicate key")
ErrDuplicateKey is returned when the key already exists in the map
Functions ¶
func AddMap ¶
func AddMap[K comparable, V any](to, from map[K]V) error
AddMap populates 'to' with elements found in 'from'
func ForEachInSlice ¶
func ForEachInSlice[S ~[]E, E any](s S, fn func(a E) E)
ForEachInSlice applies the provided function for each element of the slice.
func StringInSlice ¶
StringInSlice determines if the searched string appears in the array.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.