Documentation
¶
Overview ¶
Package ordmap implements an ordered map type.
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 }
Map is like a Go map[K]V but is ordered: it retains the insertion/update ordering where less recently updated elements precede more recently updated elements.
func (*Map[K, V]) All ¶ added in v0.0.2
All returns an iterator over key-value pairs in the map. The iteration order follows the map ordering: least recently updated first.
func (*Map[K, V]) Get ¶
Get returns the value stored in the map for a key, or the zero value of V if no value is present. The ok result indicates whether the key was found in the map.
Click to show internal directories.
Click to hide internal directories.