Skip to content

woorui/retry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Retry

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
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages