summaryrefslogtreecommitdiff
path: root/src/edit/views.go
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-11-02 19:17:04 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-11-02 19:17:04 -0400
commitb51a2c03985f09845e498ece625f5e8a309b6086 (patch)
treeb592f25121cedb3ebaa83dea6cf2f953fceb4372 /src/edit/views.go
parent59294e30d099c6bddfa290278a8c0988a351606f (diff)
better MIME type detection
Diffstat (limited to 'src/edit/views.go')
-rw-r--r--src/edit/views.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/edit/views.go b/src/edit/views.go
index 81a6945..f9ff618 100644
--- a/src/edit/views.go
+++ b/src/edit/views.go
@@ -3,8 +3,6 @@ package main
import (
"bytes"
"io"
- "mime"
- "path"
"strings"
"util"
)
@@ -62,7 +60,7 @@ func renderViewBlob(w io.Writer, upath string, file GitFile) error {
var buf bytes.Buffer
err = tmplViewBlob.Execute(&buf, map[string]string{
"path": upath,
- "ctype": mime.TypeByExtension(path.Ext(upath)),
+ "ctype": getctype(upath, content),
"content": string(content),
})
if err != nil {