package
module
Version:
v0.0.0-...-49b3bd4
Opens a new window with list of versions in this module.
Published: May 8, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 1
Opens a new window with list of known importers.
Documentation
¶
type SyncMap[K goutil.Hashable, V any] struct {
}
func NewMap[K goutil.Hashable, V any]() *SyncMap[K, V]
func (syncmap *SyncMap[K, V]) Del(key K)
Del removes an item by key
func (syncmap *SyncMap[K, V]) ForEach(cb func(key K, value V) bool)
ForEach runs a callback function for each key value pair
in the callback, return true to continue, and false to break the loop
Get returns a value or an error if it exists
Has returns true if a key value exists in the list
func (syncmap *SyncMap[K, V]) Set(key K, value V)
Set sets or adds a new key with a value
Source Files
¶
Click to show internal directories.
Click to hide internal directories.