Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ImmediateString ¶ added in v0.10.0
type ImmediateString string
ImmediateString implements lazy.Interface for plain string value
func (ImmediateString) GetLazyValue ¶ added in v0.10.0
func (s ImmediateString) GetLazyValue() string
type Interface ¶ added in v0.11.0
type Interface[T any] interface { GetLazyValue() T }
Interface defines methods required for a lazy value
type Value ¶
type Value[T any] struct { // Create is the function to create the lazy value Create func() T // contains filtered or unexported fields }
Value holds a lazily initialized value, the Create func is used to initialize the value and is called when GetLazyValue() called for the first time
func (*Value[T]) GetLazyValue ¶ added in v0.12.0
func (v *Value[T]) GetLazyValue() T
Click to show internal directories.
Click to hide internal directories.