Documentation ¶
Index ¶
- func Clone[K comparable, V any](m map[K]V) map[K]V
- type Map
- func (m Map[K, V]) Clone() map[K]V
- func (m Map[K, V]) ContainsKey(key K) bool
- func (m Map[K, V]) Equals(other Map[K, V], equal func(left, right V) bool) bool
- func (m Map[K, V]) ForEach(f func(k K, v V))
- func (m Map[K, V]) Get(key K) (V, bool)
- func (m Map[K, V]) IsEmpty() bool
- func (m Map[K, V]) Keys() []K
- func (m Map[K, V]) Len() int
- func (m Map[K, V]) Values() []V
- func (m Map[K, V]) With(key K, value V) Map[K, V]
- func (m Map[K, V]) Without(key K) Map[K, V]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
func Clone[K comparable, V any](m map[K]V) map[K]V
maps.Clone doesn’t work correctly, see: https://github.com/golang/go/issues/53087
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func CreateMap ¶
func CreateMap[K comparable, V any](inner map[K]V) Map[K, V]
func CreateMapUnsafe ¶
func CreateMapUnsafe[K comparable, V any](inner map[K]V) Map[K, V]
func EmptyMap ¶
func EmptyMap[K comparable, V any]() Map[K, V]
func (Map[K, V]) ContainsKey ¶
Click to show internal directories.
Click to hide internal directories.