summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/fs/gopher.go26
1 files changed, 13 insertions, 13 deletions
diff --git a/contrib/fs/gopher.go b/contrib/fs/gopher.go
index dc5b312..e902b4e 100644
--- a/contrib/fs/gopher.go
+++ b/contrib/fs/gopher.go
@@ -133,31 +133,31 @@ i {{ $hostname }} {{ $port }}
func GuessGopherItemType(filepath string) sr.Status {
ext := path.Ext(filepath)
switch ext {
- case "gophermap":
+ case ".gophermap":
return gopher.MenuType
- case "txt", "gmi":
+ case ".txt", ".gmi":
return gopher.TextFileType
- case "gif", "png", "jpg", "jpeg":
+ case ".gif", ".png", ".jpg", ".jpeg":
return gopher.ImageFileType
- case "mp4", "mov":
+ case ".mp4", ".mov":
return gopher.MovieFileType
- case "mp3", "aiff", "aif", "aac", "ogg", "flac", "alac", "wma":
+ case ".mp3", ".aiff", ".aif", ".aac", ".ogg", ".flac", ".alac", ".wma":
return gopher.SoundFileType
- case "bmp":
+ case ".bmp":
return gopher.BitmapType
- case "doc", "docx", "odt":
+ case ".doc", ".docx", ".odt":
return gopher.DocumentType
- case "html", "htm":
+ case ".html", ".htm":
return gopher.HTMLType
- case "rtf":
+ case ".rtf":
return gopher.RtfDocumentType
- case "wav":
+ case ".wav":
return gopher.WavSoundFileType
- case "pdf":
+ case ".pdf":
return gopher.PdfDocumentType
- case "xml":
+ case ".xml":
return gopher.XmlDocumentType
- case "":
+ case ".":
return gopher.BinaryFileType
}