Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoWithWaitGroup ¶ added in v0.0.4
GoWithWaitGroup runs the provided block function in a new goroutine and increments the WaitGroup counter while it's executing.
Types ¶
type List ¶
type List[K any] interface { Add(item K) RemoveAll(filter func(item K) bool) (removed bool) List() []K Size() int Sort(less func(i1, i2 K) bool) }
func NewArrayList ¶
type ListMap ¶
type ListMap[K comparable, V any] interface { Add(K, V) bool RemoveAll(K, func(V) bool) (bool, bool) Get(K) []V Keys() []K Sort(K, func(v1 V, v2 V) (less bool)) }
func NewListMap ¶
func NewListMap[K comparable, V any]() ListMap[K, V]
type Map ¶
type Map[K comparable, V any] interface { Put(k K, v V) Get(k K) (V, bool) Delete(k K) V Len() int Keys() []K Values() []V Clear() }
func NewCacheMap ¶
func NewCacheMap[K comparable, V any](expires time.Duration) Map[K, V]
func NewMap ¶
func NewMap[K comparable, V any]() Map[K, V]
func NewVoidMap ¶
func NewVoidMap[K comparable, V any]() Map[K, V]
Click to show internal directories.
Click to hide internal directories.