aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYotam Nachum <me@yotam.net>2019-12-06 21:28:38 +0200
committerYotam Nachum <me@yotam.net>2019-12-06 21:28:38 +0200
commit77b27a02f20d0090a0eb640d9b641bf3c4452e30 (patch)
treea9a83d333305a01deb32239a2a25ebc7997b06fb
parentRecover from panics in the main handler (diff)
downloadshavit-77b27a02f20d0090a0eb640d9b641bf3c4452e30.tar.gz
shavit-77b27a02f20d0090a0eb640d9b641bf3c4452e30.zip
Handle error from AddExtensionType
-rw-r--r--main.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/main.go b/main.go
index 5a7da06..ecf1eb0 100644
--- a/main.go
+++ b/main.go
@@ -9,7 +9,10 @@ import (
func main() {
// gmi is not recognised by Go mime package so we have to manually add it
- mime.AddExtensionType(".gmi", "text/gemini")
+ err := mime.AddExtensionType(".gmi", "text/gemini")
+ if err != nil {
+ log.Fatal(err)
+ }
flags, err := getFlags()
if err != nil {