1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-26 02:51:28 +00:00

add NewFlash func

This commit is contained in:
astaxie 2013-08-03 18:17:00 +08:00
parent 0c2af58b8d
commit 5b3b6f7f48

View File

@ -10,6 +10,12 @@ type FlashData struct {
Data map[string]string Data map[string]string
} }
func NewFlash() *FlashData{
return &FlashData{
Data:make(map[string]string)
}
}
func (fd *FlashData) Notice(msg string, args ...interface{}) { func (fd *FlashData) Notice(msg string, args ...interface{}) {
if len(args) == 0 { if len(args) == 0 {
fd.Data["notice"] = msg fd.Data["notice"] = msg