Skip to content

gotidy/lazy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazy

Starts something lazy.

func ConnectDB(ctx context.Context) (*sql.DB, error) {
    db, err := sql.Open("postgres", "postgres://...")
    if err!= nil {
        return nil, err
    }
    return db, nil
}
createDB := lazy.Me(ctx, ConnectDB, WithRetry(iters.Trim(iters.Repeat(time.Second), 5))
...
v, err := connectDB(ctx)

Packages

No packages published

Languages