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
Click to show internal directories.
Click to hide internal directories.