Documentation ¶
Index ¶
- func Capitalize(s string) string
- func IndefiniteArticle(word string) string
- func IsNil(i any) bool
- type Cache
- func (c *Cache[K, V]) Delete(k K)
- func (c *Cache[K, V]) Filter(filterFunc func(k K, v V) bool) *Cache[K, V]
- func (c *Cache[K, V]) FilterToStream(filterFunc func(k K, v V) bool) stream.Stream[*CachePair[K, V]]
- func (c *Cache[K, V]) Get(k K) (v V, got bool)
- func (c *Cache[K, V]) GetAndDelete(k K) (v V, ok bool)
- func (c *Cache[K, V]) GetOrDefault(k K, def V) (v V, got bool)
- func (c *Cache[K, V]) GetOrNew(k K, newFunc func() (V, error)) (v V, err error)
- func (c *Cache[K, V]) GetOrStore(k K, v V) (ov V, got bool)
- func (c *Cache[K, V]) Range(rangeFunc func(k K, v V) bool)
- func (c *Cache[K, V]) Set(k K, v V) (oldValue V, ok bool)
- func (c *Cache[K, V]) Size() int
- func (c *Cache[K, V]) ToMap() map[K]V
- func (c *Cache[K, V]) ToStream() stream.Stream[*CachePair[K, V]]
- type CachePair
- type Set
- type Task
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶
func IndefiniteArticle ¶
Types ¶
type Cache ¶
type Cache[K comparable, V any] struct { // contains filtered or unexported fields }
func (*Cache[K, V]) FilterToStream ¶
func (*Cache[K, V]) GetAndDelete ¶
func (*Cache[K, V]) GetOrDefault ¶
func (*Cache[K, V]) GetOrStore ¶
type CachePair ¶
type CachePair[K comparable, V any] struct { K K V V }
type Set ¶
type Set[K comparable] struct { // contains filtered or unexported fields }
func NewSet ¶
func NewSet[K comparable]() *Set[K]
func (*Set[K]) DeleteValue ¶
func (*Set[K]) DoEachAsync ¶
func (s *Set[K]) DoEachAsync(f func(v K))
Click to show internal directories.
Click to hide internal directories.