1
0
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:
Gerasimos (Makis) Maropoulos
2025-03-30 00:41:54 +02:00
parent e5e5d6f68f
commit 630c67ea6d
90 changed files with 337 additions and 167 deletions

View File

@@ -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
}
})

View File

@@ -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
}
}