Commit 5b3b6f7f authored by astaxie's avatar astaxie

add NewFlash func

parent 0c2af58b
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment