Documentation ¶
Index ¶
- Variables
- type Map
- func (m *Map[K, V]) Clear()
- func (m *Map[K, V]) CompareAndDelete(key K, value V) bool
- func (m *Map[K, V]) CompareAndSwap(key K, old, new V) bool
- func (m *Map[K, V]) Count() (size int)
- func (m *Map[K, V]) Delete(key K)
- func (m *Map[K, V]) GetMap() map[K]V
- func (m *Map[K, V]) Keys() (keys []K)
- func (m *Map[K, V]) Load(key K) (res V, ok bool)
- func (m *Map[K, V]) LoadAndDelete(key K) (res V, ok bool)
- func (m *Map[K, V]) LoadOrStore(key K, new V) (V, bool)
- func (m *Map[K, V]) Range(run func(key K, value V) bool)
- func (m *Map[K, V]) SetMap(mp map[K]V)
- func (m *Map[K, V]) SetSyncMap(mp *Map[K, V])
- func (m *Map[K, V]) SetSyncMaps(mps ...*Map[K, V])
- func (m *Map[K, V]) Store(key K, value V)
- func (m *Map[K, V]) Swap(key K, value V) (pre V, ok bool)
- func (m *Map[K, V]) Values() (values []V)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func NewMap ¶
func NewMap[K comparable, V any]() *Map[K, V]
func (*Map[K, V]) CompareAndDelete ¶
func (*Map[K, V]) CompareAndSwap ¶
func (*Map[K, V]) LoadAndDelete ¶
func (*Map[K, V]) LoadOrStore ¶
func (*Map[K, V]) SetSyncMap ¶
func (*Map[K, V]) SetSyncMaps ¶
Click to show internal directories.
Click to hide internal directories.