README ¶ go-retry Retry func if err package main import ( retry "github.com/9glt/go-retry" ) func main() { var data string err := retry.Run(func(r int) error { var err error data, err = myfunc() return err }, 3, time.Second) if err != nil { panic(err) } println(data) } func myfunc() (string, error) { return "hi", nil } Expand ▾ Collapse ▴ Documentation ¶ Index ¶ func Run(fn func(r int) error, count int, delay time.Duration) error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Run ¶ func Run(fn func(r int) error, count int, delay time.Duration) error Types ¶ This section is empty. Source Files ¶ View all Source files retry.go Click to show internal directories. Click to hide internal directories.