1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
Files
kararas_iris/_examples/bootstrapper/routes/index.go
Gerasimos (Makis) Maropoulos 630c67ea6d update code for go version 1.24
2025-03-30 00:41:54 +02:00

17 lines
297 B
Go

package routes
import (
"fmt"
"github.com/kataras/iris/v12"
)
// GetIndexHandler handles the GET: /
func GetIndexHandler(ctx iris.Context) {
ctx.ViewData("Title", "Index Page")
if err := ctx.View("index.html"); err != nil {
ctx.HTML(fmt.Sprintf("<h3>%s</h3>", err.Error()))
return
}
}