mirror of
https://github.com/gin-gonic/gin.git
synced 2025-04-06 03:57:46 +08:00
Get all query params method added which uses query cache
This commit is contained in:
parent
dc9cff732e
commit
7f18bf3b40
@ -473,6 +473,13 @@ func (c *Context) GetQueryArray(key string) (values []string, ok bool) {
|
||||
return
|
||||
}
|
||||
|
||||
// GetAllQueryParams check cache and return query cache
|
||||
// If not found cache, parses RawQuery and returns the corresponding values.
|
||||
func (c *Context) GetAllQueryParams() (params map[string][]string) {
|
||||
c.initQueryCache()
|
||||
return c.queryCache
|
||||
}
|
||||
|
||||
// QueryMap returns a map for a given query key.
|
||||
func (c *Context) QueryMap(key string) (dicts map[string]string) {
|
||||
dicts, _ = c.GetQueryMap(key)
|
||||
|
Loading…
x
Reference in New Issue
Block a user