Very simple Go package to retry a function using exponential backoff algorithm.
go get github.com/stonear/retry
import "github.com/stonear/retry"
// Define your function
func yourFunction() error {
// Your code here
return nil
}
// Call the Retry function
err := retry.Retry(yourFunction, time.Second, 5)
if err != nil {
// Handle the error
}Contributions are welcome. Please open a pull request with your changes.