follow best practices by adding resp.Body.Close() (#1708)

This commit is contained in:
Icelain 2023-12-25 19:31:37 +05:30 committed by GitHub
parent 371bc73531
commit c5f21f73a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)