aboutsummaryrefslogtreecommitdiff
path: root/fs.go
diff options
context:
space:
mode:
authorAdnan Maolood <[email protected]>2020-10-21 16:28:50 -0400
committerAdnan Maolood <[email protected]>2020-10-21 16:28:50 -0400
commitaeff8a051c4ee92ef77b97de50450bea6ecfcfef (patch)
tree7dba8ab4958458be8b9e99715606b67d8e3afa74 /fs.go
parentUpdate documentation (diff)
downloadgo-gemini-aeff8a051c4ee92ef77b97de50450bea6ecfcfef.tar.xz
go-gemini-aeff8a051c4ee92ef77b97de50450bea6ecfcfef.zip
Rename Handler to Responder
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 0c14ba9..6157fb0 100644
--- a/fs.go
+++ b/fs.go
@@ -16,7 +16,7 @@ func init() {
// FileServer takes a filesystem and returns a Handler which uses that filesystem.
// The returned Handler sanitizes paths before handling them.
-func FileServer(fsys FS) Handler {
+func FileServer(fsys FS) Responder {
return fsHandler{fsys}
}
@@ -24,7 +24,7 @@ type fsHandler struct {
FS
}
-func (fsh fsHandler) Serve(w *ResponseWriter, r *Request) {
+func (fsh fsHandler) Respond(w *ResponseWriter, r *Request) {
path := path.Clean(r.URL.Path)
f, err := fsh.Open(path)
if err != nil {