Documentation ¶
Index ¶
- type KMutex
- type Map
- func (m *Map[K, V]) Delete(k K)
- func (m *Map[K, V]) DeleteP(p func(K) bool)
- func (m *Map[K, V]) Get(k K) V
- func (m *Map[K, V]) GetDefault(k K, def func(K) V) V
- func (m *Map[K, V]) GetOk(k K) (V, bool)
- func (m *Map[K, V]) Has(k K) bool
- func (m *Map[K, V]) Raw() map[K]V
- func (m *Map[K, V]) Set(k K, v V)
- func (m *Map[K, V]) Walk(f func(k K, v V))
- type OMap
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 { Default func(k K) V Expiration time.Duration // contains filtered or unexported fields }
func (*Map[K, V]) GetDefault ¶
func (m *Map[K, V]) GetDefault(k K, def func(K) V) V
Click to show internal directories.
Click to hide internal directories.