Documentation ¶
Index ¶
- func Clone[K comparable, V any](originalMap map[K]V) map[K]V
- func Delete[K comparable, V any](m *Map[K, V], key K)
- func Load[K comparable, V any](m *Map[K, V], key K) (value V, ok bool)
- func LoadAndDelete[K comparable, V any](m *Map[K, V], key K) (value V, loaded bool)
- func LoadOrStore[K comparable, V any](m *Map[K, V], key K, value V) (actual V, loaded bool)
- func Range[K comparable, V any](m *Map[K, V], f func(key K, value V) bool)
- func Size[K comparable, V any](m *Map[K, V]) int
- func Store[K comparable, V any](m *Map[K, V], key K, value V)
- func Swap[K comparable, V any](m *Map[K, V], key K, value V) (previous V, loaded bool)
- type Map
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clone ¶
func Clone[K comparable, V any](originalMap map[K]V) map[K]V
func Delete ¶
func Delete[K comparable, V any](m *Map[K, V], key K)
func LoadAndDelete ¶
func LoadAndDelete[K comparable, V any](m *Map[K, V], key K) (value V, loaded bool)
func LoadOrStore ¶
func LoadOrStore[K comparable, V any](m *Map[K, V], key K, value V) (actual V, loaded bool)
func Store ¶
func Store[K comparable, V any](m *Map[K, V], key K, value V)
Types ¶
type Map ¶
type Map[K comparable, V any] struct { // contains filtered or unexported fields }
func NewMap ¶
func NewMap[K comparable, V any]() *Map[K, V]
Click to show internal directories.
Click to hide internal directories.