maps

package
v0.0.11 Latest Latest
Warning

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

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

Documentation

Overview

Package maps provides useful functions with maps of any type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

func Keys[M ~map[K]V, K comparable, V any](m M) []K

Keys returns the keys of the map m. The keys will be in an indeterminate order.

func Merge

func Merge[M ~map[K]V, K comparable, V any](l, r M) M

Merge returns the result of the merged maps. If a key/value pair exists in both maps, l and r, the key/value pair from r will take precedent.

func Pretty

func Pretty(m map[string]string) string

Pretty prints the map.

Types

This section is empty.

Jump to

Keyboard shortcuts

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