pull/29/head
Henrique Dias 2015-10-16 20:03:59 +01:00
parent 09f4d90142
commit 109f27170a
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
package browse
import (
"errors"
"net/http"
"strings"
@ -21,6 +22,6 @@ func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, e
case "GET":
return GET(w, r, c)
default:
return 400, nil
return 400, errors.New("Invalid method.")
}
}

View File

@ -1,6 +1,7 @@
package editor
import (
"errors"
"net/http"
"strings"
@ -18,6 +19,6 @@ func ServeHTTP(w http.ResponseWriter, r *http.Request, c *config.Config) (int, e
case "GET":
return GET(w, r, c, filename)
default:
return 400, nil
return 400, errors.New("Invalid method.")
}
}

View File

@ -81,7 +81,7 @@ func parseFrontMatterOnlyFile(rawFile map[string]interface{}, filename string) (
case "yaml":
mark = rune('-')
default:
return []byte{}, http.StatusBadRequest, errors.New("can't define the frontmatter")
return []byte{}, http.StatusBadRequest, errors.New("Can't define the frontmatter.")
}
f, err := parser.InterfaceToFrontMatter(rawFile, mark)