Skip to content

Commit cca1f7e

Browse files
author
Simon Taranto
committed
Fix go vet error on resp usage
1 parent 30b66b1 commit cca1f7e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

download/download.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ func DownloadUrl(url string, transfer *heroku.Transfer) (*os.File, error) {
1919
}
2020

2121
resp, err := http.Get(url)
22-
defer resp.Body.Close()
2322
if err != nil {
2423
return nil, err
2524
}
25+
defer resp.Body.Close()
2626

2727
n, err := io.Copy(out, resp.Body)
2828
if err != nil {

0 commit comments

Comments
 (0)