flounder

A simple gemini site builder
Log | Files | Refs | README | LICENSE

commit 2e24c3a6f64f2e2f8a9e2179e8b692dd6b13de54
parent b626eb0a83d6ee8c62d82154dd2a44badcedfeb6
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Mon, 26 Oct 2020 19:45:25 -0700

cleanup

Diffstat:
Mgemini.go | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/gemini.go b/gemini.go @@ -19,8 +19,12 @@ func gmiIndex(w *gmi.ResponseWriter, r *gmi.Request) { if err != nil { log.Fatal(err) } - files, _ := getIndexFiles() - users, _ := getUsers() + files, err := getIndexFiles() + users, err := getUsers() + if err != nil { + log.Println(err) + w.WriteHeader(40, "Internal server error") + } data := struct { Host string SiteTitle string @@ -54,7 +58,7 @@ func gmiPage(w *gmi.ResponseWriter, r *gmi.Request) { w.SetMimetype(mimetype) _, err = w.Write(data) if err != nil { - log.Fatal(err) + log.Println(err) w.WriteHeader(40, "Internal server error") return }