Documentation
¶
Index ¶
- type Map
- func (m *Map[V]) Count() int
- func (m *Map[V]) Delete(key string) (V, bool)
- func (m *Map[V]) Each(fn func(key string, value V) error) error
- func (m *Map[V]) Get(key string) (V, bool)
- func (m *Map[V]) GetOrCreate(key string, fn func() (V, error)) (V, error)
- func (m *Map[V]) Mutate(key string, fn func(value V) (V, error)) error
- func (m *Map[V]) Set(key string, value V) V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[V any] struct { // contains filtered or unexported fields }
Map is a concurrent map with string keys and generic values, partitioned for better concurrency.
func (*Map[V]) GetOrCreate ¶
GetOrCreate retrieves the value for a given key or creates it using the provided function.
Click to show internal directories.
Click to hide internal directories.