maps

package
v0.30.113 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys

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

Keys returns the keys of the map m in a slice. The keys will be returned in an unpredictable order. This function has two type parameters, K and V. Map keys must be comparable, so key has the predeclared constraint comparable. Map values can be any type.

func Values

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

Values returns the values of the map m in a slice. The values will be returned in an unpredictable order. This function has two type parameters, K and V. Map keys must be comparable, so key has the predeclared constraint comparable. Map values can be any type.

Types

This section is empty.

Jump to

Keyboard shortcuts

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