maps

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package maps contains generic functions for maps

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Keys added in v1.0.0

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

Keys returns a slice of all the keys in a map

func MapValues

func MapValues[K comparable, X, Y any](m map[K]X, f func(X) Y) map[K]Y

MapValues transforms the values of the map using the given function

func ToSlice

func ToSlice[K comparable, V, T any](m map[K]V, f func(K, V) T) []T

ToSlice converts a map to a slice using a given function

func Values

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

Values returns a slice of all the values in a map

Types

This section is empty.

Jump to

Keyboard shortcuts

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