add utils.newPathErrorErr

This commit is contained in:
Christoph Polcin 2014-10-24 14:06:52 +02:00
parent c4b0d5c93d
commit e02560544b

View File

@ -20,6 +20,10 @@ func newPathError(op string, path string, statusCode int) error {
return &os.PathError{op, path, errors.New(fmt.Sprintf("%d", statusCode))}
}
func newPathErrorErr(op string, path string, err error) error {
return &os.PathError{op, path, err}
}
func FixSlash(s string) string {
if !strings.HasSuffix(s, "/") {
s += "/"