orangesite/hn/handlers.go

24 lines
448 B
Go

package hn
import (
"net/http"
"time"
"github.com/flosch/pongo2"
"github.com/labstack/echo"
)
func indexHandler(c echo.Context) error {
tc := pongo2.Context{
"time": time.Now().UTC().Format(time.RFC3339Nano),
}
return c.Render(http.StatusOK, "index.html", tc)
}
func aboutHandler(c echo.Context) error {
tc := pongo2.Context{
"time": time.Now().UTC().Format(time.RFC3339Nano),
}
return c.Render(http.StatusOK, "about.html", tc)
}