mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-16 05:16:35 +08:00
Merge 2382eed21d1b8d9727a062a51137f9d920364d3d into e9531e5c7680d70a1e32756447535f7cfe1a6171
This commit is contained in:
commit
116bf46747
@ -200,6 +200,13 @@ func (c *Context) PostForm(key string) string {
|
|||||||
return value
|
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)
|
// Param is a shortcut for c.Params.ByName(key)
|
||||||
func (c *Context) Param(key string) string {
|
func (c *Context) Param(key string) string {
|
||||||
return c.Params.ByName(key)
|
return c.Params.ByName(key)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user