1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-23 12:57:05 +00:00

improve the flash messages test

This commit is contained in:
Makis Maropoulos
2016-07-02 15:16:42 +02:00
parent 9100560e00
commit 50b1366e9d
2 changed files with 12 additions and 4 deletions

View File

@@ -720,10 +720,10 @@ func (ctx *Context) RemoveCookie(name string) {
}
// GetFlash get a flash message by it's key
// after the request lifetime the value is removed
// returns the value as string and an error
//
// if the cookie doesn't exists the string is empty and the error is filled
// after the request's life the value is removed
func (ctx *Context) GetFlash(key string) (value string, err error) {
// first check if flash exists from this request's lifetime, if yes return that else continue to get the cookie