Add ParseForm function for *Controller
Showing
1 changed file
with
4 additions
and
0 deletions
| ... | @@ -264,6 +264,10 @@ func (c *Controller) Input() url.Values { | ... | @@ -264,6 +264,10 @@ func (c *Controller) Input() url.Values { |
| 264 | return c.Ctx.Request.Form | 264 | return c.Ctx.Request.Form |
| 265 | } | 265 | } |
| 266 | 266 | ||
| 267 | func (c *Controller) ParseForm(obj interface{}) error { | ||
| 268 | return ParseForm(c.Input(), obj) | ||
| 269 | } | ||
| 270 | |||
| 267 | func (c *Controller) GetString(key string) string { | 271 | func (c *Controller) GetString(key string) string { |
| 268 | return c.Input().Get(key) | 272 | return c.Input().Get(key) |
| 269 | } | 273 | } | ... | ... |
-
Please register or sign in to post a comment