This commit is contained in:
Henrique Dias
2016-06-24 13:17:55 +01:00
parent ddc6839d24
commit 4274a181a5
5 changed files with 119 additions and 364 deletions

View File

@@ -104,6 +104,8 @@ func ErrorToHTTPCode(err error) int {
switch {
case os.IsPermission(err):
return http.StatusForbidden
case os.IsNotExist(err):
return http.StatusNotFound
case os.IsExist(err):
return http.StatusGone
default: