Documentation ¶ Overview ¶ Package safemap provides a generic, thread safe map Index ¶ type SafeMap func NewSafeMap[T, U any]() SafeMap[T, U] Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type SafeMap ¶ type SafeMap[T, U any] interface { // Get returns a value Get(t T) (U, bool) // Set sets a value Set(t T, u U) // Keys lists all available keys Keys() []T } SafeMap is an interface for a generic, thread safe map. func NewSafeMap ¶ func NewSafeMap[T, U any]() SafeMap[T, U] NewSafeMap returns an implementation of SafeMap. Source Files ¶ View all Source files safemap.go Click to show internal directories. Click to hide internal directories.