Documentation
¶
Index ¶
- type Consumer
- type ErrorSupplier
- type Function
- type Map
- func (m *Map[K, T]) Clear()
- func (m *Map[K, T]) Delete(key K)
- func (m *Map[K, T]) Find(f func(key K, value T) bool) (*K, *T)
- func (m *Map[K, T]) ForEach(f func(key K, value T))
- func (m *Map[K, T]) ForEachModifySafe(f func(key K, value T))
- func (m *Map[K, T]) Get(key K) (T, bool)
- func (m *Map[K, T]) Len() int
- func (m *Map[K, T]) Set(key K, value T)
- type Supplier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrorSupplier ¶
type Map ¶
type Map[K comparable, T any] struct { // contains filtered or unexported fields }
func FromMap ¶
func FromMap[K comparable, T any](m map[K]T) *Map[K, T]
func NewMap ¶
func NewMap[K comparable, T any]() *Map[K, T]
func (*Map[K, T]) ForEach ¶
func (m *Map[K, T]) ForEach(f func(key K, value T))
Do not use this to modify the map
func (*Map[K, T]) ForEachModifySafe ¶
func (m *Map[K, T]) ForEachModifySafe(f func(key K, value T))
Use this if the function modifies the map
Click to show internal directories.
Click to hide internal directories.