mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
update code for go version 1.24
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/kataras/iris/v12/_examples/mvc/login/datasource"
|
||||
@@ -34,7 +35,7 @@ func main() {
|
||||
ctx.ViewData("Message", ctx.Values().
|
||||
GetStringDefault("message", "The page you're looking for doesn't exist"))
|
||||
if err := ctx.View("shared/error.html"); err != nil {
|
||||
ctx.HTML("<h3>%s</h3>", err.Error())
|
||||
ctx.HTML(fmt.Sprintf("<h3>%s</h3>", err.Error()))
|
||||
return
|
||||
}
|
||||
})
|
||||
|
||||
@@ -52,7 +52,7 @@ func newApp() *iris.Application {
|
||||
|
||||
func renderSigninForm(ctx iris.Context) {
|
||||
if err := ctx.View("signin", iris.Map{"Title": "Signin Page"}); err != nil {
|
||||
ctx.HTML("<h3>%s</h3>", err.Error())
|
||||
ctx.HTML(fmt.Sprintf("<h3>%s</h3>", err.Error()))
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user