瀏覽代碼

not use tmp var (#1032)

田欧 8 年之前
父節點
當前提交
7180f2ba62
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      context.go

+ 1 - 2
context.go

@@ -358,8 +358,7 @@ func (c *Context) QueryArray(key string) []string {
 // GetQueryArray returns a slice of strings for a given query key, plus
 // 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.
 // a boolean value whether at least one value exists for the given key.
 func (c *Context) GetQueryArray(key string) ([]string, bool) {
 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 values, true
 	}
 	}
 	return []string{}, false
 	return []string{}, false