Documentation
¶
Index ¶
- func RandString(n int) string
- func RandStrings(length, count int) []string
- type SyncMap
- func (s *SyncMap[K, V]) ComputeIfAbsent(key K, valFunc func(K) V) V
- func (s *SyncMap[K, V]) Delete(key K)
- func (s *SyncMap[K, V]) Keys() iter.Seq[K]
- func (s *SyncMap[K, V]) Load(key K) (V, bool)
- func (s *SyncMap[K, V]) Pairs() iter.Seq[SyncMapPair[K, V]]
- func (s *SyncMap[K, V]) Store(key K, val V)
- func (s *SyncMap[K, V]) Values() iter.Seq[V]
- type SyncMapPair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandString ¶
func RandStrings ¶
Types ¶
type SyncMap ¶
type SyncMap[K comparable, V any] struct { // contains filtered or unexported fields }
func NewSyncMap ¶
func NewSyncMap[K comparable, V any](defaulter func(K) V) *SyncMap[K, V]
func (*SyncMap[K, V]) ComputeIfAbsent ¶
func (s *SyncMap[K, V]) ComputeIfAbsent(key K, valFunc func(K) V) V
type SyncMapPair ¶
type SyncMapPair[K comparable, V any] struct { Key K Val V }
Click to show internal directories.
Click to hide internal directories.