package
Version:
v0.6.0
Opens a new window with list of versions in this module.
Published: Jul 31, 2025
License: Apache-2.0
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ordered provides ordered data structure.
-
type Map
-
func (m *Map[K, V]) Clone() *Map[K, V]
-
func (m *Map[K, V]) Iter() func(func(K, V) bool)
-
func (m *Map[K, V]) Keys() func(func(K) bool)
-
func (m *Map[K, V]) Load(k K) (V, bool)
-
func (m *Map[K, V]) Size() int
-
func (m *Map[K, V]) Store(k K, v V)
-
func (m *Map[K, V]) Values() func(func(V) bool)
Map is an ordered map. Iter iterates over the map
using the same order in which the keys have been added.
NewMap returns a new ordered map.
func (m *Map[K, V]) Clone() *Map[K, V]
Clone creates a new map with the same keys and values.
This is a shallow clone.
func (m *Map[K, V]) Iter() func(func(K, V) bool)
Iter returns an iterator to range over the elements of the map.
func (m *Map[K, V]) Keys() func(func(K) bool)
Keys returns an iterator to range over the keys of the map.
func (m *Map[K, V]) Load(k K) (V, bool)
Load returns a value given a key.
func (m *Map[K, V]) Size() int
Size returns the number of elements in the map.
func (m *Map[K, V]) Store(k K, v V)
Store a key,value pair.
func (m *Map[K, V]) Values() func(func(V) bool)
Values returns an iterator to range over the values of the map.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.