Merge 2382eed21d1b8d9727a062a51137f9d920364d3d into e9531e5c7680d70a1e32756447535f7cfe1a6171

This commit is contained in:
Roman Minkin 2016-01-26 19:10:59 +00:00
commit 116bf46747

View File

@ -200,6 +200,13 @@ func (c *Context) PostForm(key string) string {
return value
}
// PostFormExists returns `true` if field with given name exists in the form
func (c *Context) PostFormExists(key string) (exists bool) {
_, exists = c.postForm(key)
return exists
}
// Param is a shortcut for c.Params.ByName(key)
func (c *Context) Param(key string) string {
return c.Params.ByName(key)