maputil

package
v0.11.0-dev.3 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2023 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy added in v0.9.0

func Copy[T1 comparable, T2 any](m map[T1]T2) map[T1]T2

Copy returns a shallow copy of the given map.

func Keys

func Keys[T1 comparable, T2 any](m map[T1]T2) []T1

Keys returns the slice of keys for the given map.

func Merge added in v0.10.2

func Merge[T1 comparable, T2 any](m1, m2 map[T1]T2) map[T1]T2

Merge returns a new map that contains all the elements of the given maps.

func SortKeys added in v0.9.0

func SortKeys[T1 comparable, T2 any](m map[T1]T2, sort func([]T1)) []T1

SortKeys returns the slice of keys for the given map, sorted using given sorting function.

Types

This section is empty.

Jump to

Keyboard shortcuts

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