Registry / utility / rican7-retry

rican7-retry

JSON →
library0.3.1gogounverified

A simple, stateless, functional mechanism to perform actions repetitively until successful.

go get github.com/Rican7/retry
INSTALL
IMPORT
SIG · RICAN7-RETRY
R
rican7-retry
utilitygov0.3.1
harness data pending
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/Rican7/retry

Retry an action up to 3 times.

package main import ( "fmt" "github.com/Rican7/retry" "github.com/Rican7/retry/strategy" ) func main() { action := func(attempt uint) error { fmt.Println("Attempt", attempt) return fmt.Errorf("failed") } err := retry.Retry(action, strategy.Limit(3)) if err != nil { fmt.Println("Final error:", err) } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.1latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources
rican7-retry — go get rican7-retry · libregistry