From 6181751e8d33272276f5038927f6ac85c0de23b5 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Wed, 24 Feb 2021 14:27:49 -0500 Subject: [PATCH] Move mimetype registration to gemini.go --- fs.go | 6 ------ gemini.go | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs.go b/fs.go index 4ef515c..5e2841c 100644 --- a/fs.go +++ b/fs.go @@ -13,12 +13,6 @@ import ( "strings" ) -func init() { - // Add Gemini mime types - mime.AddExtensionType(".gmi", "text/gemini") - mime.AddExtensionType(".gemini", "text/gemini") -} - // FileServer returns a handler that serves Gemini requests with the contents // of the provided file system. // diff --git a/gemini.go b/gemini.go index 6228526..bbe59ee 100644 --- a/gemini.go +++ b/gemini.go @@ -4,6 +4,12 @@ import ( "errors" ) +func init() { + // Add Gemini mime types + mime.AddExtensionType(".gmi", "text/gemini") + mime.AddExtensionType(".gemini", "text/gemini") +} + var crlf = []byte("\r\n") // Errors.