Skip to content

Commit 4fdbf71

Browse files
authored
Fix body closing format for CI (#1128)
1 parent ae7a9c0 commit 4fdbf71

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cmd/src/gateway_benchmark.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ func benchmarkEndpointHTTP(client *http.Client, url string) time.Duration {
166166
fmt.Printf("Error calling %s: %v\n", url, err)
167167
return 0
168168
}
169-
defer func(body io.ReadCloser) {
170-
err := body.Close()
169+
defer func() {
170+
err := resp.Body.Close()
171171
if err != nil {
172172
fmt.Printf("Error closing response body: %v\n", err)
173173
}
174-
}(resp.Body)
174+
}()
175175

176176
_, err = io.ReadAll(resp.Body)
177177
if err != nil {

0 commit comments

Comments
 (0)