diff options
| author | Adnan Maolood <[email protected]> | 2021-02-24 14:27:49 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-02-24 14:27:49 -0500 |
| commit | 6181751e8d33272276f5038927f6ac85c0de23b5 (patch) | |
| tree | 016505446444794e496abde5907669af2376e774 | |
| parent | Replace uses of ioutil with io (diff) | |
| download | go-gemini-6181751e8d33272276f5038927f6ac85c0de23b5.tar.xz go-gemini-6181751e8d33272276f5038927f6ac85c0de23b5.zip | |
Move mimetype registration to gemini.go
| -rw-r--r-- | fs.go | 6 | ||||
| -rw-r--r-- | gemini.go | 6 |
2 files changed, 6 insertions, 6 deletions
@@ -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. // @@ -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. |