fixed missing return statements on error for fetch url

This commit is contained in:
BroodjeAap 2022-10-03 17:00:45 +00:00
parent 59d63bbb77
commit 60af84994e

View file

@ -155,13 +155,13 @@ func getFilterResultURL(filter *Filter, urlCache map[string]string, useCache boo
resp, err := http.Get(url)
if err != nil {
filter.log("Could not fetch url: ", url)
filter.log("Reason: ", err)
filter.log("Could not fetch url: ", url, " - ", err)
return
}
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
filter.log("Could not fetch url: ", url)
filter.log("Reason: ", err)
filter.log("Could not fetch url: ", url, " - ", err)
return
}
str := string(body)
filter.Results = append(filter.Results, str)