From a22c3e6b2f898db0262254bc9b0ce4441b44db65 Mon Sep 17 00:00:00 2001 From: Daniel Tam Date: Sat, 6 Jun 2020 23:01:03 -0500 Subject: [PATCH] changed panics to just print --- image_req.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/image_req.go b/image_req.go index 304deda..80e7908 100644 --- a/image_req.go +++ b/image_req.go @@ -52,6 +52,7 @@ func get_redditbooru_image(sub string) <-chan string{ out, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println("Error reading response from redditbooru, ", err) + return } // randomize the seed for the random int @@ -98,7 +99,8 @@ func get_imgur_image(sub string) <-chan string { // read response out, err := ioutil.ReadAll(resp.Body) if err != nil { - panic(err) + fmt.Println("Error reading response from imgur, ", err) + return } // randomize the seed for the random int @@ -144,6 +146,7 @@ func get_subreddit_image(sub string) <-chan string { out, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println("Error reading response from reddit, ", err) + return } // randomize the seed for the random int