Add (*ResponseWriter).WriteStatus function

This commit is contained in:
Adnan Maolood
2020-10-27 13:30:35 -04:00
parent 8ab4064841
commit 79165833de
4 changed files with 95 additions and 62 deletions

2
fs.go
View File

@@ -28,7 +28,7 @@ func (fsh fsHandler) Respond(w *ResponseWriter, r *Request) {
path := path.Clean(r.URL.Path)
f, err := fsh.Open(path)
if err != nil {
NotFound(w, r)
w.WriteStatus(StatusNotFound)
return
}
// Detect mimetype