Skip to content

Latest commit

 

History

History
21 lines (16 loc) · 271 Bytes

README.md

File metadata and controls

21 lines (16 loc) · 271 Bytes

Go generic lazy

go get -u github.com/go-saas/lazy
import (
    "context"
    "github.com/go-saas/lazy"
)

type A struct {
	
}

lazyA := lazy.New[*A](func(ctx context.Context) (*A, error){
	return &A{}
})
a,_ := lazyA.Value(context.Background())