1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-08 12:31:58 +00:00

resolve conflicts with current master v11.1.1

Former-commit-id: 659ff392e889f3a8552d7da3d44848f1a364f7b2
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-07-23 19:20:07 +03:00
41 changed files with 406 additions and 70 deletions

View File

@@ -44,7 +44,7 @@ func main() {
//set session values
s.Set("name", "iris")
//test if setted here
//test if set here
ctx.Writef("All ok session value of the 'name' is: %s", s.GetString("name"))
})
@@ -54,7 +54,7 @@ func main() {
// set session values
s.Set(key, value)
// test if setted here
// test if set here
ctx.Writef("All ok session value of the '%s' is: %s", key, s.GetString(key))
})

View File

@@ -45,7 +45,7 @@ func main() {
//set session values
s.Set("name", "iris")
//test if setted here
//test if set here
ctx.Writef("All ok session value of the 'name' is: %s", s.GetString("name"))
})
@@ -55,7 +55,7 @@ func main() {
// set session values
s.Set(key, value)
// test if setted here
// test if set here
ctx.Writef("All ok session value of the '%s' is: %s", key, s.GetString(key))
})

View File

@@ -53,7 +53,7 @@ func main() {
//set session values
s.Set("name", "iris")
//test if setted here
//test if set here
ctx.Writef("All ok session value of the 'name' is: %s", s.GetString("name"))
})
@@ -63,7 +63,7 @@ func main() {
// set session values
s.Set(key, value)
// test if setted here
// test if set here
ctx.Writef("All ok session value of the '%s' is: %s", key, s.GetString(key))
})
@@ -74,7 +74,7 @@ func main() {
// set session values
s.Set(key, value)
valueSet := s.Get(key)
// test if setted here
// test if set here
ctx.Writef("All ok session value of the '%s' is: %v", key, valueSet)
})

View File

@@ -13,7 +13,7 @@ func main() {
app.Get("/set", func(ctx iris.Context) {
s := sess.Start(ctx)
s.SetFlash("name", "iris")
ctx.Writef("Message setted, is available for the next request")
ctx.Writef("Message set, is available for the next request")
})
app.Get("/get", func(ctx iris.Context) {

View File

@@ -39,8 +39,8 @@ func newApp() *iris.Application {
s := mySessions.Start(ctx)
s.Set("name", "iris")
//test if setted here
ctx.Writef("All ok session setted to: %s", s.GetString("name"))
//test if set here
ctx.Writef("All ok session set to: %s", s.GetString("name"))
})
app.Get("/get", func(ctx iris.Context) {

View File

@@ -14,14 +14,14 @@ func TestSessionsEncodeDecode(t *testing.T) {
es := e.GET("/set").Expect()
es.Status(iris.StatusOK)
es.Cookies().NotEmpty()
es.Body().Equal("All ok session setted to: iris")
es.Body().Equal("All ok session set to: iris")
e.GET("/get").Expect().Status(iris.StatusOK).Body().Equal("The name on the /set was: iris")
// delete and re-get
e.GET("/delete").Expect().Status(iris.StatusOK)
e.GET("/get").Expect().Status(iris.StatusOK).Body().Equal("The name on the /set was: ")
// set, clear and re-get
e.GET("/set").Expect().Body().Equal("All ok session setted to: iris")
e.GET("/set").Expect().Body().Equal("All ok session set to: iris")
e.GET("/clear").Expect().Status(iris.StatusOK)
e.GET("/get").Expect().Status(iris.StatusOK).Body().Equal("The name on the /set was: ")
}

View File

@@ -44,8 +44,8 @@ func main() {
s := sess.Start(ctx)
s.Set("name", "iris")
//test if setted here.
ctx.Writef("All ok session setted to: %s", s.GetString("name"))
//test if set here.
ctx.Writef("All ok session set to: %s", s.GetString("name"))
// Set will set the value as-it-is,
// if it's a slice or map