mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 18:51:03 +01:00
15 lines
276 B
Go
15 lines
276 B
Go
package routes
|
|
|
|
import (
|
|
"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("<h3>%s</h3>", err.Error())
|
|
return
|
|
}
|
|
}
|