extmap

package
v0.0.0-...-95b54a6 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func All

func All[K comparable, V any](ma map[K]V) iter.Seq2[K, V]

func Clear

func Clear[K comparable, V any](ma map[K]V)

func Delete

func Delete[K comparable, V any](ma map[K]V, k K)

func Entries

func Entries[K comparable, V any](ma map[K]V) iter.Seq2[K, V]

func Get

func Get[K comparable, V any](ma map[K]V, k K) (V, bool)

func GetOrZero

func GetOrZero[K comparable, V any](ma map[K]V, k K) V

func Has

func Has[K comparable, V any](ma map[K]V, k K) bool

func Keys

func Keys[K comparable, V any](ma map[K]V) iter.Seq[K]

func Set

func Set[K comparable, V any](ma map[K]V, k K, v V) map[K]V

func Size

func Size[K comparable, V any](ma map[K]V) int

func Values

func Values[K comparable, V any](ma map[K]V) iter.Seq[V]

Types

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func (*Map[K, V]) All

func (ma *Map[K, V]) All(k K) iter.Seq2[K, V]

func (*Map[K, V]) Clear

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

func (*Map[K, V]) Delete

func (ma *Map[K, V]) Delete(k K) *Map[K, V]

func (*Map[K, V]) Entries

func (ma *Map[K, V]) Entries() iter.Seq2[K, V]

func (*Map[K, V]) Get

func (ma *Map[K, V]) Get(k K) (V, bool)

func (*Map[K, V]) GetOrZero

func (ma *Map[K, V]) GetOrZero(k K) V

func (*Map[K, V]) Has

func (ma *Map[K, V]) Has(k K) bool

func (*Map[K, V]) Keys

func (ma *Map[K, V]) Keys() iter.Seq[K]

func (*Map[K, V]) Set

func (ma *Map[K, V]) Set(k K, v V) *Map[K, V]

func (*Map[K, V]) Size

func (ma *Map[K, V]) Size() int

func (*Map[K, V]) Values

func (ma *Map[K, V]) Values() iter.Seq[V]

Jump to

Keyboard shortcuts

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