gen

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteItem

func DeleteItem[T comparable](s []T, item T) []T

func Filter

func Filter[T any](s []T, f func(i T) bool) []T

func MapFilterKeys

func MapFilterKeys[K comparable, T any](m map[K]T, f func(i T) bool) []K

func MapKeys

func MapKeys[K comparable, T any](m map[K]T) []K

func MapKeysSorted

func MapKeysSorted[K constraints.Ordered, T any](m map[K]T) []K

Types

type SyncMap

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

func NewSyncMap

func NewSyncMap[K comparable, V any]() *SyncMap[K, V]

func (*SyncMap[K, V]) Delete

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

func (*SyncMap[K, V]) Keys

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

func (*SyncMap[K, V]) Load

func (m *SyncMap[K, V]) Load(k K) (V, bool)

func (*SyncMap[K, V]) Store

func (m *SyncMap[K, V]) Store(k K, v V)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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