maporder

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package maporder provides the deterministic map traversal order shared by Shape's tagged, validation, and transformation paths.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Reflect

func Reflect(ctx context.Context, value reflect.Value) ([]reflect.Value, error)

Reflect returns the keys of a reflected supported map in ascending order.

func Sorted

func Sorted[K Key, V any](ctx context.Context, values map[K]V) ([]K, error)

Sorted returns the keys in ascending order and observes cancellation while collecting and sorting them.

Types

type Key

type Key interface {
	~string |
		~int | ~int8 | ~int16 | ~int32 | ~int64 |
		~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64
}

Key is the set of map-key types supported by Shape collections.

Jump to

Keyboard shortcuts

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