Documentation
¶
Index ¶
- type Map
- func (g *Map[K, V]) AsMap() map[K]V
- func (g *Map[K, V]) Clear()
- func (g *Map[K, V]) Clone() storage.IMap[K, V]
- func (g *Map[K, V]) Del(key K)
- func (g *Map[K, V]) ForEach(fn func(K, V) bool)
- func (g *Map[K, V]) Get(key K) (V, bool)
- func (g *Map[K, V]) Keys() []K
- func (g *Map[K, V]) Set(key K, value V)
- func (g *Map[K, V]) Size() int
- func (g *Map[K, V]) Values() []V
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 { // contains filtered or unexported fields }
Map is a thread-safe map using sync.Map with generics
func (*Map[K, V]) AsMap ¶
func (g *Map[K, V]) AsMap() map[K]V
AsMap returns a regular map containing all key-value pairs
func (*Map[K, V]) Clear ¶
func (g *Map[K, V]) Clear()
Clear removes all key-value pairs from the map
func (*Map[K, V]) Set ¶
func (g *Map[K, V]) Set(key K, value V)
Set adds a key-value pair to the map
Click to show internal directories.
Click to hide internal directories.