structure

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2022 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConcurrentMap

type ConcurrentMap[T any] struct {
	// contains filtered or unexported fields
}

ConcurrentMap represents map container

func NewConcurrentMap

func NewConcurrentMap[T any]() *ConcurrentMap[T]

func (*ConcurrentMap[T]) Find

func (container *ConcurrentMap[T]) Find(key string) (item T, err error)

Find returns item if key is not exist, returns not found error

func (*ConcurrentMap[T]) Get

func (container *ConcurrentMap[T]) Get(key string) (item T, exist bool)

Get return item and exist

func (*ConcurrentMap[T]) Set

func (container *ConcurrentMap[T]) Set(key string, value T) error

Set sets map item

Jump to

Keyboard shortcuts

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