sortmap

package
v0.0.0-...-f79c7ce Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pair

type Pair[K constraints.Ordered, V any] struct {
	Key   K
	Value V
}

Pair represents the KV pairs in the input map of Sort.

func Sort

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

Sort converts an unordered golang map to a slice sorted by map key.

Jump to

Keyboard shortcuts

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