lazy

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLazyValue

func GetLazyValue(x reflect.Value) reflect.Value

GetLazyValue returns return value of x.GetLazyValue() when x implements that method, otherwise return x directly

Types

type ImmediateString added in v0.10.0

type ImmediateString string

func (ImmediateString) GetLazyValue added in v0.10.0

func (s ImmediateString) GetLazyValue() string

type LazyValue added in v0.10.0

type LazyValue[T any] struct {
	Create func() T
	// contains filtered or unexported fields
}

func (*LazyValue[T]) GetLazyValue added in v0.10.0

func (v *LazyValue[T]) GetLazyValue() T

type LazyValueType added in v0.10.0

type LazyValueType[T any] interface {
	GetLazyValue() T
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL