orderedmap

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func New

func New[K comparable, V any](sort SortFunc[K]) *Map[K, V]

func NewStable

func NewStable[K cmp.Ordered, V any]() *Map[K, V]

func (*Map[K, V]) Add

func (o *Map[K, V]) Add(k K, v V)

func (*Map[K, V]) Keys

func (o *Map[K, V]) Keys() []K

func (*Map[K, V]) Pairs

func (o *Map[K, V]) Pairs() []Pair[K, V]

type Pair

type Pair[K comparable, V any] struct {
	K K
	V V
}

type SortFunc

type SortFunc[K comparable] func(s []K)

Jump to

Keyboard shortcuts

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