From 7f18bf3b400ce654a1b8a6e85e22e3e92a4abcde Mon Sep 17 00:00:00 2001 From: Depender Yadav Date: Thu, 7 Sep 2023 12:22:21 +0530 Subject: [PATCH] Get all query params method added which uses query cache --- context.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/context.go b/context.go index 420ff167..c2ffd001 100644 --- a/context.go +++ b/context.go @@ -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)