syncmap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

syncmap implements a simple generic, synchronized map.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncMap

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

func New

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

func (*SyncMap[K, V]) ForEach

func (c *SyncMap[K, V]) ForEach(f func(k K, v V))

func (*SyncMap[K, V]) Get

func (c *SyncMap[K, V]) Get(key K) (V, bool)

func (*SyncMap[K, V]) Keys

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

func (*SyncMap[K, V]) Put

func (c *SyncMap[K, V]) Put(key K, value V)

func (*SyncMap[K, V]) Remove

func (c *SyncMap[K, V]) Remove(key K)

Jump to

Keyboard shortcuts

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