Skip to content
This repository was archived by the owner on Mar 21, 2019. It is now read-only.

Commit 4045664

Browse files
committed
add AddValues
1 parent 5c6c44d commit 4045664

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

flash.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
package flash
66

77
import (
8+
"net/url"
9+
810
"github.com/lunny/tango"
911
"github.com/tango-contrib/session"
1012
)
@@ -63,6 +65,12 @@ func (f *Flash) Add(kvs Data) {
6365
}
6466
}
6567

68+
func (f *Flash) AddValues(values url.Values) {
69+
for k, vals := range values {
70+
f.Set(k, vals[0])
71+
}
72+
}
73+
6674
func (f *Flash) Save() {
6775
if f.saved {
6876
return

0 commit comments

Comments
 (0)