1
0
Fork 0
mirror of https://git.sr.ht/~adnano/go-gemini synced 2024-05-04 23:26:10 +02:00

Move mimetype registration to gemini.go

This commit is contained in:
Adnan Maolood 2021-02-24 14:27:49 -05:00
parent 48c67bcead
commit 6181751e8d
2 changed files with 6 additions and 6 deletions

6
fs.go
View File

@ -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.
//

View File

@ -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.