Skip to content

Commit

Permalink
defer body close
Browse files Browse the repository at this point in the history
  • Loading branch information
lucian-ioan committed Nov 30, 2023
1 parent ad0a9e8 commit 4e73b12
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func TestFetch(t *testing.T) {

taskStatsResp, err := buildResponse("./_meta/testdata/task_stats.json")
assert.NoError(t, err)
defer taskStatsResp.Body.Close()

byteTaskResp, err := buildResponse("./_meta/testdata/task.json")

Check failure on line 36 in x-pack/metricbeat/module/awsfargate/task_stats/task_stats_integration_test.go

View workflow job for this annotation

GitHub Actions / lint (windows)

response body must be closed (bodyclose)
assert.NoError(t, err)
Expand Down

0 comments on commit 4e73b12

Please sign in to comment.