Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SafeMap ¶
type SafeMap[K comparable, V any] struct { // contains filtered or unexported fields }
SafeMap is a thread-safe map.
func NewSafeMap ¶
func NewSafeMap[K comparable, V any]() *SafeMap[K, V]
NewSafeMap creates a new SafeMap.
func (*SafeMap[K, V]) Delete ¶
func (m *SafeMap[K, V]) Delete(key K)
Delete deletes a value from the map.
func (*SafeMap[K, V]) Get ¶
Get gets a value from the map.
func (*SafeMap[K, V]) Iter ¶
Iter returns a channel that iterates over the map.
Click to show internal directories.
Click to hide internal directories.