smap

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortMap

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

func MakeSortMap

func MakeSortMap[M map[K]V, K comparable, V any](m map[K]V) SortMap[M, K, V]

func (SortMap[M, K, V]) Range

func (m SortMap[M, K, V]) Range(s func(a, b K) int, f func(k K, v V))

func (SortMap[M, K, V]) SortKey

func (m SortMap[M, K, V]) SortKey(f func(a, b K) int) ([]K, []V)

type SyncedMap

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

func (*SyncedMap[K, V]) Delete

func (s *SyncedMap[K, V]) Delete(key K)

func (*SyncedMap[K, V]) Load

func (s *SyncedMap[K, V]) Load(key K) (V, bool)

func (*SyncedMap[K, V]) LoadAndDelete

func (s *SyncedMap[K, V]) LoadAndDelete(key K) (V, bool)

func (*SyncedMap[K, V]) LoadOrStore

func (s *SyncedMap[K, V]) LoadOrStore(key K, value V) (V, bool)

func (*SyncedMap[K, V]) Range

func (s *SyncedMap[K, V]) Range(f func(k K, v V) bool)

func (*SyncedMap[K, V]) Store

func (s *SyncedMap[K, V]) Store(key K, value V)

func (*SyncedMap[K, V]) Swap

func (s *SyncedMap[K, V]) Swap(key K, value V) (V, bool)

Jump to

Keyboard shortcuts

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