diff options
author | Yotam Nachum <me@yotam.net> | 2019-12-06 21:28:38 +0200 |
---|---|---|
committer | Yotam Nachum <me@yotam.net> | 2019-12-06 21:28:38 +0200 |
commit | 77b27a02f20d0090a0eb640d9b641bf3c4452e30 (patch) | |
tree | a9a83d333305a01deb32239a2a25ebc7997b06fb | |
parent | Recover from panics in the main handler (diff) | |
download | shavit-77b27a02f20d0090a0eb640d9b641bf3c4452e30.tar.gz shavit-77b27a02f20d0090a0eb640d9b641bf3c4452e30.zip |
Handle error from AddExtensionType
-rw-r--r-- | main.go | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 { |