/*Simple library for retry mechanismslightly inspired by [Try::Tiny::Retry](https://metacpan.org/pod/Try::Tiny::Retry)SYNOPSIShttp get with retry: url := "http://example.com" var body []byte err := retry.Do( func() error { resp, err := http.Get(url) if err != nil { return err } defer resp.Body.Close() body, err = ioutil.ReadAll(resp.Body) if err != nil { return err } return nil }, ) fmt.Println(body)[next examples](https://github.com/avast/retry-go/tree/master/examples)SEE ALSO* [giantswarm/retry-go](https://github.com/giantswarm/retry-go) - slightly complicated interface.* [sethgrid/pester](https://github.com/sethgrid/pester) - only http retry for http calls with retries and backoff* [cenkalti/backoff](https://github.com/cenkalti/backoff) - Go port of the exponential backoff algorithm from Google's HTTP Client Library for Java. Really complicated interface.* [rafaeljesus/retry-go](https://github.com/rafaeljesus/retry-go) - looks good, slightly similar as this package, don't have 'simple' `Retry` method* [matryer/try](https://github.com/matryer/try) - very popular package, nonintuitive interface (for me)BREAKING CHANGES3.0.0* `DelayTypeFunc` accepts a new parameter `err` - this breaking change affects only your custom Delay Functions. This change allow [make delay functions based on error](examples/delay_based_on_error_test.go).1.0.2 -> 2.0.0* argument of `retry.Delay` is final delay (no multiplication by `retry.Units` anymore)* function `retry.Units` are removed* [more about this breaking change](https://github.com/avast/retry-go/issues/7)0.3.0 -> 1.0.0* `retry.Retry` function are changed to `retry.Do` function* `retry.RetryCustom` (OnRetry) and `retry.RetryCustomWithOpts` functions are now implement via functions produces Options (aka `retry.OnRetry`)*/
The pages are generated with Goldsv0.6.7. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds.