fix misspell

This commit is contained in:
MengZn 2020-10-18 00:34:26 +08:00
parent fe1a25d735
commit 3bbf15bb7e

View File

@ -13,7 +13,7 @@ const (
type RetryPredicator func(e error) bool type RetryPredicator func(e error) bool
// Retry retrys the passed functin for "attempts" times, if passed function return error. Setting attemps to zero means keep retrying. // Retry retrys the passed function for "attempts" times, if passed function return error. Setting attempts to zero means keep retrying.
func Retry(ctx context.Context, attempts int, duration time.Duration, fnToRetry func() error, errHandler func(error), predicators ...RetryPredicator) (err error) { func Retry(ctx context.Context, attempts int, duration time.Duration, fnToRetry func() error, errHandler func(error), predicators ...RetryPredicator) (err error) {
infinite := false infinite := false
if attempts == InfiniteRetry { if attempts == InfiniteRetry {