Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type OnceCreator ¶
type OnceCreator[T any] struct { // contains filtered or unexported fields }
func NewOnceCreator ¶
func NewOnceCreator[T any](createObject func() T) (*OnceCreator[T], error)
func (*OnceCreator[T]) LoadOrCreate ¶
func (m *OnceCreator[T]) LoadOrCreate(key string) T
Click to show internal directories.
Click to hide internal directories.