aboutsummaryrefslogtreecommitdiff
path: root/fs.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2020-11-09 13:44:42 -0500
committerAdnan Maolood <[email protected]>2020-11-09 13:44:42 -0500
commit85f8e84bd5799091a5af972828495eb244379adb (patch)
tree4a558aa110ae6bb4696e61821b805628d0d3b000 /fs.go
parentAdd (*KnownHosts).SetOutput function (diff)
downloadgo-gemini-85f8e84bd5799091a5af972828495eb244379adb.tar.xz
go-gemini-85f8e84bd5799091a5af972828495eb244379adb.zip
Rename (*ResponseWriter).SetMimetype to SetMediaType
Diffstat (limited to 'fs.go')
-rw-r--r--fs.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs.go b/fs.go
index e44556c..c4cf3d3 100644
--- a/fs.go
+++ b/fs.go
@@ -33,7 +33,7 @@ func (fsh fsHandler) Respond(w *ResponseWriter, r *Request) {
// Detect mimetype
ext := path.Ext(p)
mimetype := mime.TypeByExtension(ext)
- w.SetMimetype(mimetype)
+ w.SetMediaType(mimetype)
// Copy file to response writer
io.Copy(w, f)
}
@@ -72,7 +72,7 @@ func ServeFile(w *ResponseWriter, fs FS, name string) {
// Detect mimetype
ext := path.Ext(name)
mimetype := mime.TypeByExtension(ext)
- w.SetMimetype(mimetype)
+ w.SetMediaType(mimetype)
// Copy file to response writer
io.Copy(w, f)
}