mirror of
https://github.com/gin-gonic/gin.git
synced 2026-06-27 20:48:24 +08:00
Merge 5a78885058f5b2f83cd5d8b4a85e1da9b1a9f4a5 into c0048f645ee945c4db30593afdea10123e2c30a6
This commit is contained in:
commit
53a5eb433b
12
context.go
12
context.go
@ -563,6 +563,12 @@ func (c *Context) initQueryCache() {
|
||||
}
|
||||
}
|
||||
|
||||
// SetQuery Modify or add to the cached Query data
|
||||
func (c *Context) SetQuery(key,values string) {
|
||||
c.initQueryCache()
|
||||
c.queryCache.Set(key,values)
|
||||
}
|
||||
|
||||
// GetQueryArray returns a slice of strings for a given query key, plus
|
||||
// a boolean value whether at least one value exists for the given key.
|
||||
func (c *Context) GetQueryArray(key string) (values []string, ok bool) {
|
||||
@ -636,6 +642,12 @@ func (c *Context) initFormCache() {
|
||||
}
|
||||
}
|
||||
|
||||
// SetForm Modify or add to the cached Form data
|
||||
func (c *Context) SetForm(key,values string) {
|
||||
c.initFormCache()
|
||||
c.formCache.Set(key,values)
|
||||
}
|
||||
|
||||
// GetPostFormArray returns a slice of strings for a given form key, plus
|
||||
// a boolean value whether at least one value exists for the given key.
|
||||
func (c *Context) GetPostFormArray(key string) (values []string, ok bool) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user