Forgot to close body after doing a http request
This commit is contained in:
parent
d739497e8c
commit
e15d03cb37
1
assos.go
1
assos.go
|
@ -38,6 +38,7 @@ func getArticles(endpoint, forB64 string) []Article {
|
|||
if err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
if resp.StatusCode != 200 {
|
||||
log.Fatalln("Error when fetching articles, server returned " + resp.Status)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue