Skip to content

Commit

Permalink
pd-api-bench: fix the gosec check (#7086)
Browse files Browse the repository at this point in the history
ref #4399

Fix the gosec check warning.

Signed-off-by: JmPotato <[email protected]>
  • Loading branch information
JmPotato committed Sep 13, 2023
1 parent cfa263a commit d0cebac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/pd-api-bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ func main() {
log.Println("concurrency == 0, exit")
return
}
pdClis := make([]pd.Client, 0)
pdClis := make([]pd.Client, *client)
for i := 0; i < *client; i++ {
pdClis = append(pdClis, newPDClient(ctx))
pdClis[i] = newPDClient(ctx)
}
httpClis := make([]*http.Client, 0)
httpClis := make([]*http.Client, *client)
for i := 0; i < *client; i++ {
httpClis = append(httpClis, newHTTPClient())
httpClis[i] = newHTTPClient()
}
err = cases.InitCluster(ctx, pdClis[0], httpClis[0])
if err != nil {
Expand Down

0 comments on commit d0cebac

Please sign in to comment.