package
Version:
v0.78.4
Opens a new window with list of versions in this module.
Published: Feb 4, 2026
License: MIT
Opens a new window with license information.
Imports: 1
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]) Delete(key K)
-
func (m *Map[K, V]) Len() int
-
func (m *Map[K, V]) Load(key K) (value V, ok bool)
-
func (m *Map[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)
-
func (m *Map[K, V]) Range(f func(key K, value V) bool)
-
func (m *Map[K, V]) Store(key K, value V)
Map is a type-safe concurrent map with comparable keys and any values.
func (m *Map[K, V]) Delete(key K)
Delete deletes the value for a key.
Len returns the number of elements in the map.
func (m *Map[K, V]) Load(key K) (value V, ok bool)
Load returns the value for a key if it exists.
func (m *Map[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)
LoadOrStore loads or stores the value for a key.
func (m *Map[K, V]) Range(f func(key K, value V) bool)
Range calls f sequentially for each key and value present in the map.
If f returns false, the range stops.
func (m *Map[K, V]) Store(key K, value V)
Store sets the value for a key.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.