follow best practices by adding resp.Body.Close() (#1708)
This commit is contained in:
parent
371bc73531
commit
c5f21f73a4
1 changed files with 2 additions and 0 deletions
|
@ -18,6 +18,8 @@ func main() {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
defer resp.Body.Close()
|
||||
|
||||
responseData, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
|
Loading…
Reference in a new issue