Documentation
¶
Index ¶
- type Map
- func (m *Map[K, V]) Get(key K) (value V, ok bool)
- func (m *Map[K, V]) GetAndRemove(key K) (value V, ok bool)
- func (m *Map[K, V]) Has(key K) bool
- func (m *Map[K, V]) Put(key K, value V)
- func (m *Map[K, V]) Remove(key K) bool
- func (m *Map[K, V]) Start(ctx context.Context) (stop func())
- func (m *Map[K, V]) Update(key K, cb func(value V) V) bool
- func (m *Map[K, V]) Upsert(key K, cb func(exists bool, value V) V)
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 }
func (*Map[K, V]) GetAndRemove ¶
Looks up a key's value from the map and removes it.
Click to show internal directories.
Click to hide internal directories.