common

package
v1.0.10 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ITable

type ITable[K comparable, V any] interface {
	Put(key K, value V)
	Get(key K) (V, bool)
	Delete(key K)
	Len() int
	All(func(k K, obj V) bool)
}

type RegMap

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

func (*RegMap[K, V]) All

func (t *RegMap[K, V]) All(f func(k K, obj V) bool)

func (*RegMap[K, V]) Delete

func (t *RegMap[K, V]) Delete(key K)

func (*RegMap[K, V]) Get

func (t *RegMap[K, V]) Get(key K) (V, bool)

func (*RegMap[K, V]) Len

func (t *RegMap[K, V]) Len() int

func (*RegMap[K, V]) Put

func (t *RegMap[K, V]) Put(key K, value V)

Jump to

Keyboard shortcuts

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