fastpastebin/api/http/index.go

22 lines
367 B
Go
Raw Normal View History

2018-04-30 18:42:17 +05:00
package http
import (
// stdlib
"net/http"
// local
"github.com/pztrn/fastpastebin/api/http/static"
// other
"github.com/labstack/echo"
)
func indexGet(ec echo.Context) error {
html, err := static.ReadFile("index.html")
if err != nil {
return ec.String(http.StatusNotFound, "index.html wasn't found!")
}
return ec.HTML(http.StatusOK, string(html))
}