Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
Map is a thread-safe map.
func (*Map[K, V]) Add ¶
func (p *Map[K, V]) Add(key K, value V)
Add adds a key-value pair to the map
func (*Map[K, V]) ForEach ¶
ForEach iterates over the map and calls the given function for each key-value pair. If the function returns an error, the iteration is stopped and the error is returned.
func (*Map[K, V]) Get ¶
Get returns the value for the given key and a boolean indicating if the key was found
Click to show internal directories.
Click to hide internal directories.