Documentation ¶
Index ¶
- type Map
- func (cm *Map[K, V]) Clear()
- func (cm *Map[K, V]) Clone() map[K]V
- func (cm *Map[K, V]) Delete(k K)
- func (cm *Map[K, V]) Get(k K) (V, bool)
- func (cm *Map[K, V]) GetUnchecked(k K) V
- func (cm *Map[K, V]) Keys() []K
- func (cm *Map[K, V]) Len() int
- func (cm *Map[K, V]) Set(k K, v V)
- func (cm *Map[K, V]) UpdateValue(key K, transformer ValueTransformer[V])
- func (cm *Map[K, V]) Values() []V
- type ValueTransformer
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 }
func MapOf ¶
func MapOf[K comparable, V any](src map[K]V) *Map[K, V]
func (*Map[K, V]) GetUnchecked ¶
func (cm *Map[K, V]) GetUnchecked(k K) V
func (*Map[K, V]) UpdateValue ¶
func (cm *Map[K, V]) UpdateValue(key K, transformer ValueTransformer[V])
type ValueTransformer ¶
type ValueTransformer[V any] func(V) V
Click to show internal directories.
Click to hide internal directories.