3
0
mirror of https://github.com/gin-gonic/gin.git synced 2025-04-06 03:57:46 +08:00

not use tmp var ()

This commit is contained in:
田欧 2017-07-18 11:39:39 +08:00 committed by Bo-Yi Wu
parent 30cfa590bb
commit 7180f2ba62

@ -358,8 +358,7 @@ func (c *Context) QueryArray(key string) []string {
// 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) ([]string, bool) {
req := c.Request
if values, ok := req.URL.Query()[key]; ok && len(values) > 0 {
if values, ok := c.Request.URL.Query()[key]; ok && len(values) > 0 {
return values, true
}
return []string{}, false