Skip to content

go-saas/lazy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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())

About

golang lazy initialize object

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages