mirror of
https://github.com/astaxie/beego.git
synced 2025-06-21 01:20:18 +00:00
add NewFlash func
This commit is contained in:
6
flash.go
6
flash.go
@ -10,6 +10,12 @@ type FlashData struct {
|
||||
Data map[string]string
|
||||
}
|
||||
|
||||
func NewFlash() *FlashData{
|
||||
return &FlashData{
|
||||
Data:make(map[string]string)
|
||||
}
|
||||
}
|
||||
|
||||
func (fd *FlashData) Notice(msg string, args ...interface{}) {
|
||||
if len(args) == 0 {
|
||||
fd.Data["notice"] = msg
|
||||
|
Reference in New Issue
Block a user