From 11ade5a1631e2019eb140c838ff6ab7e27d5337e Mon Sep 17 00:00:00 2001 From: thinkerou Date: Thu, 24 Aug 2017 17:20:04 +0800 Subject: [PATCH] reduce go cyclo --- gin.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gin.go b/gin.go index 23853a97..78cead64 100644 --- a/gin.go +++ b/gin.go @@ -318,12 +318,12 @@ func (engine *Engine) handleHTTPRequest(context *Context) { httpMethod := context.Request.Method var path string var unescape bool + + path = context.Request.URL.Path + unescape = false if engine.UseRawPath && len(context.Request.URL.RawPath) > 0 { path = context.Request.URL.RawPath unescape = engine.UnescapePathValues - } else { - path = context.Request.URL.Path - unescape = false } // Find root of the tree for the given HTTP method