fix forgotten close body

This commit is contained in:
Dzyanis Kuzmenka 2022-03-17 23:07:54 +03:00
parent 8e69e2423f
commit 74e28788e6
2 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,6 @@ linters:
- whitespace
- gofumpt
- godot
# - gofmt
- gocritic
- gocognit
- deadcode

View File

@ -220,6 +220,7 @@ func (r *Request) sendHTTPRequest(method, urlstr string, host string, headers ma
if err != nil {
return nil, err
}
defer resp.Body.Close()
ret := &Response{Code: resp.StatusCode, Header: resp.Header}
buf, err := io.ReadAll(resp.Body)