orderedmap

package
v0.69.1 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderedMap

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

OrderedMap is a map that preserves insertion order of keys.

func New

func New[K comparable, V any](capacity int) *OrderedMap[K, V]

func NewWithData

func NewWithData[K comparable, V any](keys []K, data map[K]V) *OrderedMap[K, V]

func (*OrderedMap[K, V]) AsMap

func (m *OrderedMap[K, V]) AsMap() map[K]V

func (*OrderedMap[K, V]) Get

func (m *OrderedMap[K, V]) Get(key K) (V, bool)

func (*OrderedMap[K, V]) Iter

func (m *OrderedMap[K, V]) Iter() iter.Seq2[K, V]

Iter returns an iterator over the map

func (*OrderedMap[K, V]) Len

func (m *OrderedMap[K, V]) Len() int

Len returns the number of entires in the map

func (*OrderedMap[K, V]) Set

func (m *OrderedMap[K, V]) Set(key K, value V)

func (*OrderedMap[K, V]) UnmarshalYAML

func (m *OrderedMap[K, V]) UnmarshalYAML(n *yaml.Node) error

Jump to

Keyboard shortcuts

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