1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-20 03:17:04 +00:00

Update to version 8.5.5

Former-commit-id: b5be58709f17758a8df3ebc99270b97ccd8b18f2
This commit is contained in:
kataras
2017-11-02 05:50:56 +02:00
parent 6607008054
commit 666bcacf20
97 changed files with 38154 additions and 38162 deletions

View File

@@ -14,8 +14,6 @@ func main() {
if err != nil {
panic(err)
}
// use different go routines to sync the database
db.Async(true)
// close and unlock the database when control+C/cmd+C pressed
iris.RegisterOnInterrupt(func() {
@@ -44,7 +42,7 @@ func main() {
s.Set("name", "iris")
//test if setted here
ctx.Writef("All ok session setted to: %s", s.GetString("name"))
ctx.Writef("All ok session value of the 'name' is: %s", s.GetString("name"))
})
app.Get("/set/{key}/{value}", func(ctx iris.Context) {
@@ -54,14 +52,14 @@ func main() {
s.Set(key, value)
// test if setted here
ctx.Writef("All ok session setted to: %s", s.GetString(key))
ctx.Writef("All ok session value of the '%s' is: %s", key, s.GetString(key))
})
app.Get("/get", func(ctx iris.Context) {
// get a specific key, as string, if no found returns just an empty string
name := sess.Start(ctx).GetString("name")
ctx.Writef("The name on the /set was: %s", name)
ctx.Writef("The 'name' on the /set was: %s", name)
})
app.Get("/get/{key}", func(ctx iris.Context) {
@@ -91,5 +89,5 @@ func main() {
sess.ShiftExpiration(ctx)
})
app.Run(iris.Addr(":8080"))
app.Run(iris.Addr(":8080"), iris.WithoutServerError(iris.ErrServerClosed), iris.WithoutVersionChecker)
}