Retry kits for Golang development.
go get -u github.com/likexian/gokit
import (
"github.com/likexian/gokit/xtry"
)
Visit the docs on GoDoc
c := Config{
Timeout: 5 * time.Minute,
RetryDelay: 2 * time.Second,
}
ctx := context.Background()
err := c.Run(ctx, func(context.Context) error {
return doSomething()
})
if err != nil {
panic(err)
}
Copyright 2012-2024 Li Kexian
Licensed under the Apache License 2.0
If this project is helpful, please share it with friends.
If you want to thank me, you can give me a cup of coffee.