maps

package
v0.0.0-...-016edcc Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMutex

type KMutex struct {
	// contains filtered or unexported fields
}

func (*KMutex) Get

func (m *KMutex) Get(key string) *sync.Mutex

type Map

type Map[K comparable, V any] struct {
	Default    func(k K) V
	Expiration time.Duration
	// contains filtered or unexported fields
}

func (*Map[K, V]) Delete

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

func (*Map[K, V]) DeleteP

func (m *Map[K, V]) DeleteP(p func(K) bool)

func (*Map[K, V]) Get

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

func (*Map[K, V]) GetDefault

func (m *Map[K, V]) GetDefault(k K, def func(K) V) V

func (*Map[K, V]) GetOk

func (m *Map[K, V]) GetOk(k K) (V, bool)

func (*Map[K, V]) Has

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

func (*Map[K, V]) Raw

func (m *Map[K, V]) Raw() map[K]V

func (*Map[K, V]) Set

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

func (*Map[K, V]) Walk

func (m *Map[K, V]) Walk(f func(k K, v V))

type OMap

type OMap[K constraints.Ordered, V any] struct {
	Map[K, V]
}

func (*OMap[K, V]) Keys

func (m *OMap[K, V]) Keys() []K

Jump to

Keyboard shortcuts

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