Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InitializerFn ¶
type InitializerFn[T comparable] func() (T, error)
type Lazy ¶
type Lazy[T comparable] struct { // contains filtered or unexported fields }
A data structure that will lazily load an instance of the underlying type from the specified initializer
func From ¶
func From[T comparable](value T) *Lazy[T]
From creates a lazy that resolves to the specified value.
func NewLazy ¶
func NewLazy[T comparable](initializerFn InitializerFn[T]) *Lazy[T]
Creates a new Lazy[T]
Click to show internal directories.
Click to hide internal directories.