retry

package module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 2 Imported by: 4

README

Retry - Catch Panic In Retries

PkgGoDev Build Status Go Report Card Coverage Status GitHub issues Release

Installation

To install the package, run:

go get github.com/go-zoox/retry

Getting Started

err := retry.Retry(
	func() {
		c++
		if c < 3 {
			panic("panic error")
		}
	},
	3,
	time.Millisecond,
)

License

GoZoox is released under the MIT License.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Retry

func Retry(fn func(), times int, interval time.Duration) error

Retry trys to run fn with times and interval

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL