collections

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IntMap

type IntMap = Map[int, any]

func NewIntMap

func NewIntMap() *IntMap

type Map

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

func NewMap

func NewMap[K comparable, V any]() *Map[K, V]

func (*Map[K, V]) Add

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

func (*Map[K, V]) Contains

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

func (*Map[K, V]) Delete

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

func (*Map[K, V]) Get

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

func (*Map[K, V]) GetKeys

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

func (*Map[K, V]) Len

func (m *Map[K, V]) Len() int

func (*Map[K, V]) MustGet

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

func (*Map[K, V]) Purge

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

type StringListMap

type StringListMap = Map[string, []string]

Convenience type aliases for common use cases

func NewStringListMap

func NewStringListMap() *StringListMap

Convenience constructors for common use cases

type StringMap

type StringMap = Map[string, string]

func NewStringMap

func NewStringMap() *StringMap

Jump to

Keyboard shortcuts

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