maps

package
v0.4.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2023 License: Apache-2.0 Imports: 0 Imported by: 1

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL