Documentation ¶ Index ¶ type Lazy func New[T any](fn func() (T, error)) Lazy[T] Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Lazy ¶ type Lazy[T any] interface { Get() (T, error) // IfInitialized calls the given function if the value has been initialized (useful for shutdown logic) IfInitialized(func(T) error) error } func New ¶ func New[T any](fn func() (T, error)) Lazy[T] Source Files ¶ View all Source files lazy.go Click to show internal directories. Click to hide internal directories.