package
Version:
v0.0.0-...-14fd01d
Opens a new window with list of versions in this module.
Published: Jan 5, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package syncmap provides a concurrent map implementation using parameterized types.
-
type Map
-
func (m *Map[K, V]) Clear()
-
func (m *Map[K, V]) Get(k K) (V, bool)
-
func (m *Map[K, V]) Keys() []K
-
func (m *Map[K, V]) Len() int
-
func (m *Map[K, V]) Put(k K, v V)
-
func (m *Map[K, V]) Range() iter.Seq2[K, V]
-
func (m *Map[K, V]) Remove(k K)
-
func (m *Map[K, V]) Values() []V
The Map type wraps a map within a sync.RWMutex.
func (m *Map[K, V]) Clear()
Clear all entries within the Map.
func (m *Map[K, V]) Get(k K) (V, bool)
Get a value from the Map. The boolean return value indicates if a value was found.
func (m *Map[K, V]) Keys() []K
Keys returns a slice of all keys within the Map.
Len returns the number of entries within the Map.
func (m *Map[K, V]) Put(k K, v V)
Put a value into the Map.
Range over all keys and values in the Map.
func (m *Map[K, V]) Remove(k K)
Remove an entry from the Map.
func (m *Map[K, V]) Values() []V
Values returns a slice of all values within the Map.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.