chore: update code format. (#628)
This commit is contained in:
@@ -15,7 +15,7 @@ type (
|
||||
|
||||
// DoWithRetry runs fn, and retries if failed. Default to retry 3 times.
|
||||
func DoWithRetry(fn func() error, opts ...RetryOption) error {
|
||||
var options = newRetryOptions()
|
||||
options := newRetryOptions()
|
||||
for _, opt := range opts {
|
||||
opt(options)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ func TestRetry(t *testing.T) {
|
||||
return errors.New("any")
|
||||
}))
|
||||
|
||||
var total = 2 * defaultRetryTimes
|
||||
total := 2 * defaultRetryTimes
|
||||
times = 0
|
||||
assert.Nil(t, DoWithRetry(func() error {
|
||||
times++
|
||||
|
||||
Reference in New Issue
Block a user