package
1.0.22
Repository: https://github.com/numberman1/common.git
Documentation: pkg.go.dev

# Functions

Get returns a previously created value for the singleton, else the default value for T.
GetOrDo will create and store a value in the Singleton, if one doesn't already exist, by calling the fn, else it will return the existing value.

# Variables

ErrTypeMismatch is returned when trying to get a result for some type that is different from the stored type.

# Structs

Singleton can store a single value atomically when used with GetOrDo.