1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-07 23:01:56 +02:00

Use defined const for index.html in Context (#502)

Signed-off-by: Tors Dalid <tors@pocketmath.com>
This commit is contained in:
Tors Dalid 2016-10-27 05:50:08 +08:00 committed by Vishal Rana
parent 8686b3c5c7
commit 72bfbc3492

View File

@ -422,7 +422,7 @@ func (c *context) File(file string) error {
fi, _ := f.Stat()
if fi.IsDir() {
file = filepath.Join(file, "index.html")
file = filepath.Join(file, indexPage)
f, err = os.Open(file)
if err != nil {
return ErrNotFound