mirror of
https://github.com/kataras/iris.git
synced 2025-12-24 05:17:03 +00:00
builtin html template functions changes
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/v12"
|
||||
"github.com/kataras/iris/v12/x/errors"
|
||||
)
|
||||
|
||||
// $ go install github.com/go-bindata/go-bindata/v3/go-bindata@latest
|
||||
@@ -28,7 +27,7 @@ func newApp() *iris.Application {
|
||||
app.Get("/", func(ctx iris.Context) {
|
||||
ctx.ViewData("Page", page)
|
||||
if err := ctx.View("index.html"); err != nil {
|
||||
errors.InvalidArgument.Err(ctx, err)
|
||||
ctx.HTML("<h3>%s</h3>", err.Error())
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user