package retry_test
import (
"context"
"errors"
"fmt"
"time"
"github.com/woorui/retry"
)
func Example() {
errfn := func(ctx context.Context) error {
return errors.New("errString")
}
err := retry.Call(
context.Background(),
retry.FunctionFunc(errfn),
2,
retry.FixedRetryStrategy(time.Second),
)
fmt.Println(err)
// Output:
// errString
}
-
Notifications
You must be signed in to change notification settings - Fork 0
woorui/retry
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published