mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-24 02:32:17 +08:00
reduce go cyclo
This commit is contained in:
parent
8be30bd382
commit
11ade5a163
6
gin.go
6
gin.go
@ -318,12 +318,12 @@ func (engine *Engine) handleHTTPRequest(context *Context) {
|
|||||||
httpMethod := context.Request.Method
|
httpMethod := context.Request.Method
|
||||||
var path string
|
var path string
|
||||||
var unescape bool
|
var unescape bool
|
||||||
|
|
||||||
|
path = context.Request.URL.Path
|
||||||
|
unescape = false
|
||||||
if engine.UseRawPath && len(context.Request.URL.RawPath) > 0 {
|
if engine.UseRawPath && len(context.Request.URL.RawPath) > 0 {
|
||||||
path = context.Request.URL.RawPath
|
path = context.Request.URL.RawPath
|
||||||
unescape = engine.UnescapePathValues
|
unescape = engine.UnescapePathValues
|
||||||
} else {
|
|
||||||
path = context.Request.URL.Path
|
|
||||||
unescape = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find root of the tree for the given HTTP method
|
// Find root of the tree for the given HTTP method
|
||||||
|
Loading…
x
Reference in New Issue
Block a user