Flash Messages
import "github.com/kataras/iris/v12/sessions"
sess := sessions.New(sessions.Config{Cookie: "cookieName", ...})// [app := iris.New...]
app.Get("/path", func(ctx iris.Context) {
session := sess.Start(ctx)
// [...]
})SetFlash(key string, value interface{})
HasFlash() bool
GetFlashes() map[string]interface{}
PeekFlash(key string) interface{}
GetFlash(key string) interface{}
GetFlashString(key string) string
GetFlashStringDefault(key string, defaultValue string) string
DeleteFlash(key string)
ClearFlashes()Last updated
Was this helpful?