Fix zero length slice declaration in util/retry/retry.go (#12576)

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2021-12-01 23:43:37 +08:00 committed by GitHub
parent 6dd7afd1a4
commit 2bd32353cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -28,7 +28,7 @@ func Do(ctx context.Context, fn func() error, opts ...Option) error {
for _, opt := range opts { for _, opt := range opts {
opt(c) opt(c)
} }
el := make(ErrorList, 0) var el ErrorList
for i := uint(0); i < c.attempts; i++ { for i := uint(0); i < c.attempts; i++ {
if err := fn(); err != nil { if err := fn(); err != nil {