57afd3d9 by asta.xie

GetStrings action as GetString

1 parent f7430a2c
...@@ -308,11 +308,11 @@ func (c *Controller) GetString(key string) string { ...@@ -308,11 +308,11 @@ func (c *Controller) GetString(key string) string {
308 // GetStrings returns the input string slice by key string. 308 // GetStrings returns the input string slice by key string.
309 // it's designed for multi-value input field such as checkbox(input[type=checkbox]), multi-selection. 309 // it's designed for multi-value input field such as checkbox(input[type=checkbox]), multi-selection.
310 func (c *Controller) GetStrings(key string) []string { 310 func (c *Controller) GetStrings(key string) []string {
311 r := c.Ctx.Request 311 f := c.Input()
312 if r.Form == nil { 312 if f == nil {
313 return []string{} 313 return []string{}
314 } 314 }
315 vs := r.Form[key] 315 vs := f[key]
316 if len(vs) > 0 { 316 if len(vs) > 0 {
317 return vs 317 return vs
318 } 318 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!