package
Version:
v0.0.0-...-2d567a2
Opens a new window with list of versions in this module.
Published: Aug 21, 2026
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
¶
-
type Map
-
func (m *Map[K, V]) All() iter.Seq2[K, V]
-
func (m *Map[K, V]) At(idx int) (V, bool)
-
func (m *Map[K, V]) Contains(key K) bool
-
func (m *Map[K, V]) Delete(key K) bool
-
func (m *Map[K, V]) Get(key K) (V, bool)
-
func (m *Map[K, V]) Len() int
-
func (m *Map[K, V]) Set(key K, value V)
Map is an ordered map of values.
The zero value of a Map is an empty map ready to use.
All returns an iterator over all items in the map in the order they were added.
Modifying the map during iteration can result in some members not being visited.
At returns the value at the given position.
func (m *Map[K, V]) Contains(key K) bool
Contains returns whether the given key exists in the map.
func (m *Map[K, V]) Delete(key K) bool
Delete deletes the value for the given key.
func (m *Map[K, V]) Get(key K) (V, bool)
Get returns the value with the given key.
Len returns the number of items in the map.
func (m *Map[K, V]) Set(key K, value V)
Set sets the value for the given key in the map.
If the key already exists in the map, the value replaces the existing value, keeping the position of the old value.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.