maputil

package
v1.65.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SortedKeys

func SortedKeys[V any](m map[string]V) []string

SortedKeys returns the keys of a map sorted alphabetically.

An empty or nil map yields an empty slice rather than a nil one, so a caller that serializes the result writes an empty list and not a null.

Not slices.Sorted(maps.Keys(m)): that grows without a size hint, measured at 3 to 15 allocations against 1 here, and this has callers on the walk and generate paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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