sync

package
v0.0.0-...-2db3d1b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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 (*Map[K, V]) Clear

func (m *Map[K, V]) Clear()

func (*Map[K, V]) Delete

func (m *Map[K, V]) Delete(key K)

func (*Map[K, V]) Has

func (m *Map[K, V]) Has(key K) bool

Has returns either or not the map has the provided key

func (*Map[K, V]) Iter

func (m *Map[K, V]) Iter() iter.Seq2[K, V]

func (*Map[K, V]) IterKeys

func (m *Map[K, V]) IterKeys() iter.Seq[K]

func (*Map[K, V]) IterValues

func (m *Map[K, V]) IterValues() iter.Seq[V]

func (*Map[K, V]) Keys

func (m *Map[K, V]) Keys() (out []K)

func (*Map[K, V]) Load

func (m *Map[K, V]) Load(key K) (V, bool)

func (*Map[K, V]) LoadAndDelete

func (m *Map[K, V]) LoadAndDelete(key K) (V, bool)

func (*Map[K, V]) LoadOrStore

func (m *Map[K, V]) LoadOrStore(key K, value V) (V, bool)

func (*Map[K, V]) Range

func (m *Map[K, V]) Range(f func(key K, value V) bool)

func (*Map[K, V]) RangeKeys

func (m *Map[K, V]) RangeKeys(f func(key K) bool)

func (*Map[K, V]) RangeValues

func (m *Map[K, V]) RangeValues(f func(value V) bool)

func (*Map[K, V]) Store

func (m *Map[K, V]) Store(key K, value V)

Store sets the value for a key.

func (*Map[K, V]) Swap

func (m *Map[K, V]) Swap(key K, value V) (V, bool)

func (*Map[K, V]) Values

func (m *Map[K, V]) Values() (out []V)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL