package
Version:
v1.0.6
Opens a new window with list of versions in this module.
Published: Nov 13, 2023
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ordered implements a simple ordered map to ensure that the insertion order
in the elements of a map is maintained.
Map represents an ordered map.
NewMap creates a new ordered map object.
func (m *Map) Append(key string, value interface{})
Append appends a new key-value pair to the map. If the key already exists the value will be overwritten.
Has checks if map contains given key.
func (m *Map) Iterate(iterator mapIterator)
Iterate iterates through the map key-value pairs. If the passed function returns false the iteration will
stop and Iterate returns immediately.
Len returns the number of kay-value pairs in the map.
String implements the stringer interface.
Value returns the value for given key, nil if key don't exist.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.