Commit 57afd3d9 authored by asta.xie's avatar asta.xie

GetStrings action as GetString

parent f7430a2c
......@@ -308,11 +308,11 @@ func (c *Controller) GetString(key string) string {
// GetStrings returns the input string slice by key string.
// it's designed for multi-value input field such as checkbox(input[type=checkbox]), multi-selection.
func (c *Controller) GetStrings(key string) []string {
r := c.Ctx.Request
if r.Form == nil {
f := c.Input()
if f == nil {
return []string{}
}
vs := r.Form[key]
vs := f[key]
if len(vs) > 0 {
return vs
}
......
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