From d748f97cf1d1c487e3d1f210f3a3dab0c90c3538 Mon Sep 17 00:00:00 2001 From: thinkerou Date: Fri, 25 Aug 2017 05:54:01 +0800 Subject: [PATCH] use := var --- gin.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/gin.go b/gin.go index 78cead64..ee39c9aa 100644 --- a/gin.go +++ b/gin.go @@ -316,11 +316,8 @@ func (engine *Engine) HandleContext(c *Context) { func (engine *Engine) handleHTTPRequest(context *Context) { httpMethod := context.Request.Method - var path string - var unescape bool - - path = context.Request.URL.Path - unescape = false + path := context.Request.URL.Path + unescape := false if engine.UseRawPath && len(context.Request.URL.RawPath) > 0 { path = context.Request.URL.RawPath unescape = engine.UnescapePathValues