Skip to content

Commit

Permalink
Merge pull request #19 from tonny-zhang/develop
Browse files Browse the repository at this point in the history
feat: add GetAllQuery
  • Loading branch information
tonny-zhang authored Aug 11, 2021
2 parents c0510d0 + 1127ae6 commit 27f9ebb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion context.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ func newContext(w http.ResponseWriter, r *http.Request, router *Router) *Context

ctx.router = router

// ctxPool.Put(ctx)
return ctx
}
func (ctx *Context) destroy() {
Expand Down Expand Up @@ -176,6 +175,12 @@ func (ctx *Context) GetQueryMap(key string) (dicts map[string]string, exists boo
return getValue(ctx.queryCache, key)
}

// GetAllQuery get all query value
func (ctx Context) GetAllQuery() url.Values {
ctx.initQueryCache()
return ctx.queryCache
}

// Param returns the value of the URL param.
// router.GET("/user/:id", func(c *gin.Context) {
// // a GET request to /user/john
Expand Down

0 comments on commit 27f9ebb

Please sign in to comment.