Documentation
¶
Overview ¶
replacing this with `https://pkg.go.dev/golang.org/x/exp/maps` should be considered when `x/exp/maps` graduates to stable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
func Clone[K comparable, V any, S ~map[K]V](s S) S
Clone clones the input preserving the difference between nil and empty
func Merge ¶
func Merge[K comparable, V any, S ~map[K]V](a, b S, resolveConflict func(a, b V) V) S
Merge merges a and b while resolving the conflicts by calling resolveConflict
func MergeKeepFirst ¶
func MergeKeepFirst[K comparable, V any, S ~map[K]V](a, b S) S
Merge merges a and b keeping the values in a in case of conflict
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.