From f6fc203a0d9e82fd058e498b36eb600173234ad2 Mon Sep 17 00:00:00 2001 From: vaporvee Date: Mon, 11 Mar 2024 22:10:56 +0100 Subject: [PATCH] why was it fatal? --- cmd_cat.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd_cat.go b/cmd_cat.go index c64e10f..5fbdfbd 100644 --- a/cmd_cat.go +++ b/cmd_cat.go @@ -31,19 +31,19 @@ type CatImage struct { func GetCatImageURL() string { resp, err := http.Get("https://cataas.com/cat?json=true") if err != nil { - log.Fatal("Error making GET request:", err) + log.Print("Error making GET request:", err) } defer resp.Body.Close() body, err := io.ReadAll(resp.Body) if err != nil { - log.Fatal("Error reading response body:", err) + log.Print("Error reading response body:", err) } var images CatImage err = json.Unmarshal(body, &images) if err != nil { - log.Fatal("Error unmarshalling JSON:", err) + log.Print("Error unmarshalling JSON:", err) } return "https://cataas.com/cat/" + images.ID