mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-18 23:12:17 +08:00
refactor
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
parent
9b0fe9690a
commit
e0c3f7978b
5
tree.go
5
tree.go
@ -710,7 +710,9 @@ walk: // Outer loop for walking the tree
|
||||
|
||||
if n.handlers != nil {
|
||||
return ciPath
|
||||
} else if fixTrailingSlash && len(n.children) == 1 {
|
||||
}
|
||||
|
||||
if fixTrailingSlash && len(n.children) == 1 {
|
||||
// No handle found. Check if a handle for this path + a
|
||||
// trailing slash exists
|
||||
n = n.children[0]
|
||||
@ -718,6 +720,7 @@ walk: // Outer loop for walking the tree
|
||||
return append(ciPath, '/')
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
case catchAll:
|
||||
|
Loading…
x
Reference in New Issue
Block a user