if name has value, it will show "Empty name!!"

Former-commit-id: 58dd393a2c724aba8b7ffa0237ca9b0d7fdd5de1
This commit is contained in:
Slash 2017-04-17 17:20:14 +08:00 committed by Gerasimos (Makis) Maropoulos
parent 9f4cea1e52
commit 0bfd133763

View File

@ -22,7 +22,7 @@ func main() {
app.Get("/get", func(ctx *iris.Context) {
name := ctx.Session().GetFlashString("name")
if name != "" {
if name == "" {
ctx.Writef("Empty name!!")
return
}
@ -31,7 +31,7 @@ func main() {
app.Get("/test", func(ctx *iris.Context) {
name := ctx.Session().GetFlashString("name")
if name != "" {
if name == "" {
ctx.Writef("Empty name!!")
return
}