Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
retry
✓ github.com/avast/retry-go
Retry a function with default backoff
package main
import (
"errors"
"fmt"
"github.com/avast/retry-go"
)
func main() {
err := retry.Do(
func() error {
return errors.New("temporary error")
},
retry.Attempts(3),
)
fmt.Println(err)
}
Debug
Known issues
breakingVersion 3.0.0+incompatible uses Go modules incorrectly; prefer v4+ for proper semantic import versioning.fixUse retry-go/v4 or later versions.
affects: 3.0.0+incompatible
Upgrade
Version history
3.0.0+incompatiblelatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.