From 27cedaf411e06254dfbe4079203e45007dbd2f43 Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Thu, 17 Sep 2015 12:12:01 -0700 Subject: [PATCH] Using filepath instead of path Signed-off-by: Vishal Rana --- echo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/echo.go b/echo.go index 84473f1d..dfb7590f 100644 --- a/echo.go +++ b/echo.go @@ -8,7 +8,7 @@ import ( "io" "log" "net/http" - spath "path" + "path/filepath" "reflect" "runtime" "strings" @@ -382,7 +382,7 @@ func (e *Echo) ServeDir(path, dir string) { // ServeFile serves a file. func (e *Echo) ServeFile(path, file string) { e.Get(path, func(c *Context) error { - dir, file := spath.Split(file) + dir, file := filepath.Split(file) return serveFile(dir, file, c) }) } @@ -396,7 +396,7 @@ func serveFile(dir, file string, c *Context) error { fi, _ := f.Stat() if fi.IsDir() { - file = spath.Join(file, indexFile) + file = filepath.Join(file, indexFile) f, err = fs.Open(file) if err != nil { return NewHTTPError(http.StatusForbidden)