aboutsummaryrefslogtreecommitdiff
path: root/handler.go
diff options
context:
space:
mode:
authorYotam Nachum <me@yotam.net>2019-11-22 16:45:23 +0200
committerYotam Nachum <me@yotam.net>2019-11-22 17:28:19 +0200
commit6f79975ce14da38b1f15e9beb6ec58b16165efb5 (patch)
treef089946f0da26ae6eae7708371d34393dd4658cb /handler.go
parentAdd an option to specify custom config file (diff)
downloadshavit-6f79975ce14da38b1f15e9beb6ec58b16165efb5.tar.gz
shavit-6f79975ce14da38b1f15e9beb6ec58b16165efb5.zip
Add more tools to CI linting
Diffstat (limited to 'handler.go')
-rw-r--r--handler.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/handler.go b/handler.go
index bba9955..9f258ec 100644
--- a/handler.go
+++ b/handler.go
@@ -28,7 +28,7 @@ func (h Handler) urlAbsPath(rawURL string) (string, error) {
}
if !strings.HasPrefix(itemPath, h.cfg.SourceDir) {
- return "", gemini.Error{Err: fmt.Errorf("Permission Denied"), Status: gemini.StatusBadRequest}
+ return "", gemini.Error{Err: fmt.Errorf("permission denied"), Status: gemini.StatusBadRequest}
}
return itemPath, nil
@@ -58,7 +58,7 @@ func (h Handler) getFilePath(rawURL string) (string, error) {
return indexPath, nil
}
- return "", gemini.Error{Err: fmt.Errorf("File Not Found"), Status: gemini.StatusNotFound}
+ return "", gemini.Error{Err: fmt.Errorf("file not found"), Status: gemini.StatusNotFound}
}
// Handle implement the gemini.Handler interface by serving files from a given source directory