5b3b6f7f by astaxie

add NewFlash func

1 parent 0c2af58b
Showing 1 changed file with 6 additions and 0 deletions
...@@ -10,6 +10,12 @@ type FlashData struct { ...@@ -10,6 +10,12 @@ type FlashData struct {
10 Data map[string]string 10 Data map[string]string
11 } 11 }
12 12
13 func NewFlash() *FlashData{
14 return &FlashData{
15 Data:make(map[string]string)
16 }
17 }
18
13 func (fd *FlashData) Notice(msg string, args ...interface{}) { 19 func (fd *FlashData) Notice(msg string, args ...interface{}) {
14 if len(args) == 0 { 20 if len(args) == 0 {
15 fd.Data["notice"] = msg 21 fd.Data["notice"] = msg
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!