Commit 9b7e4fb
authored
Close HTTP response bodies to fix bodyclose lint (#566)
Two spots were missing resp.Body.Close() calls:
- update_test.go: the http.Post response was discarded. Now we
capture it and close the body before returning.
- run.go (checkCredAccess): the response from the GitHub API
token-scope check was never closed. Added a defer.1 parent fe8b225 commit 9b7e4fb
File tree
2 files changed
+3
-1
lines changed- cmd/dependabot/internal/cmd
- internal/infra
2 files changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
302 | 303 | | |
303 | 304 | | |
304 | 305 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| |||
0 commit comments