Documentation ¶
Overview ¶
Temporary sync map replacement with generics until go 1.18 bakes a bit and one gets released.
Index ¶
- type Syncmap
- func (s *Syncmap[Key, Value]) Delete(key Key)
- func (s *Syncmap[Key, Value]) Get(key Key) (Value, bool)
- func (s *Syncmap[Key, Value]) Keys() []Key
- func (s *Syncmap[Key, Value]) Set(key Key, value Value)
- func (s *Syncmap[Key, Value]) Swap(key Key, fn func(value Value, exists bool) (Value, error)) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Syncmap ¶
type Syncmap[Key comparable, Value any] struct { // contains filtered or unexported fields }
func New ¶
func New[Key comparable, Value any]() Syncmap[Key, Value]
Click to show internal directories.
Click to hide internal directories.