summaryrefslogtreecommitdiff
path: root/pkg/motd/fetch.go
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-12-08 20:46:02 +0100
committerkali kaneko (leap communications) <kali@leap.se>2021-12-08 20:46:02 +0100
commitca3f128194888e30aadc149eb40a1370931eb2eb (patch)
tree8a0e616ca65fbecf854b52d1118826d5a9aa537c /pkg/motd/fetch.go
parent18a1683d6ffc790d093a3fc30c67a631f16bfd13 (diff)
[bug] panic no more
Diffstat (limited to 'pkg/motd/fetch.go')
-rw-r--r--pkg/motd/fetch.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/motd/fetch.go b/pkg/motd/fetch.go
index fd76d7c..2262152 100644
--- a/pkg/motd/fetch.go
+++ b/pkg/motd/fetch.go
@@ -56,7 +56,7 @@ func FetchLatest() []Message {
func fetchURL(url string) ([]byte, error) {
resp, err := http.Get(url)
if err != nil {
- panic(err)
+ return []byte(""), err
}
defer resp.Body.Close()
return ioutil.ReadAll(resp.Body)