util

package
v0.0.0-...-095f669 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IterateMapOrdered

func IterateMapOrdered[K constraints.Ordered, V any](m map[K]V, forEach func(k K, v V) error) error

IterateMapOrdered iterates over the map with keys sorted in ascending order calling forEach for each key-value pair as long as forEach does not return an error.

func OrderedMapKeys

func OrderedMapKeys[K constraints.Ordered, V any](m map[K]V) []K

OrderedMapKeys returns the map keys in ascending order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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