Files
ionscale/internal/handlers/index.go
T
Johan Siebens 5ad89ff02f initial working version
Signed-off-by: Johan Siebens <johan.siebens@gmail.com>
2022-05-09 21:54:06 +02:00

18 lines
373 B
Go

package handlers
import (
"fmt"
"github.com/jsiebens/ionscale/internal/version"
"github.com/labstack/echo/v4"
)
func IndexHandler(code int) echo.HandlerFunc {
return func(c echo.Context) error {
info, s := version.GetReleaseInfo()
data := map[string]interface{}{
"Version": fmt.Sprintf("%s - %s", info, s),
}
return c.Render(code, "index.html", data)
}
}