delete else keyword (#948)
This commit is contained in:
parent
9ee5afff48
commit
6dac8c8a48
4
gin.go
4
gin.go
@ -326,8 +326,8 @@ func (engine *Engine) handleHTTPRequest(context *Context) {
|
|||||||
context.Next()
|
context.Next()
|
||||||
context.writermem.WriteHeaderNow()
|
context.writermem.WriteHeaderNow()
|
||||||
return
|
return
|
||||||
|
}
|
||||||
} else if httpMethod != "CONNECT" && path != "/" {
|
if httpMethod != "CONNECT" && path != "/" {
|
||||||
if tsr && engine.RedirectTrailingSlash {
|
if tsr && engine.RedirectTrailingSlash {
|
||||||
redirectTrailingSlash(context)
|
redirectTrailingSlash(context)
|
||||||
return
|
return
|
||||||
|
3
tree.go
3
tree.go
@ -432,7 +432,8 @@ walk: // Outer loop for walking the tree
|
|||||||
|
|
||||||
if handlers = n.handlers; handlers != nil {
|
if handlers = n.handlers; handlers != nil {
|
||||||
return
|
return
|
||||||
} else if len(n.children) == 1 {
|
}
|
||||||
|
if len(n.children) == 1 {
|
||||||
// No handle found. Check if a handle for this path + a
|
// No handle found. Check if a handle for this path + a
|
||||||
// trailing slash exists for TSR recommendation
|
// trailing slash exists for TSR recommendation
|
||||||
n = n.children[0]
|
n = n.children[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user