mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-14 04:08:15 +08:00
Merge dc281f790c88eebdba270e7705f087d50d1a570f into c3d1092b3b48addf6f9cd00fe274ec3bd14650eb
This commit is contained in:
commit
0b5440b834
3
gin.go
3
gin.go
@ -12,6 +12,7 @@ import (
|
||||
"os"
|
||||
"path"
|
||||
"regexp"
|
||||
"slices"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
@ -72,6 +73,7 @@ type RouteInfo struct {
|
||||
Path string
|
||||
Handler string
|
||||
HandlerFunc HandlerFunc
|
||||
HandlersChain HandlersChain
|
||||
}
|
||||
|
||||
// RoutesInfo defines a RouteInfo slice.
|
||||
@ -393,6 +395,7 @@ func iterate(path, method string, routes RoutesInfo, root *node) RoutesInfo {
|
||||
Path: path,
|
||||
Handler: nameOfFunction(handlerFunc),
|
||||
HandlerFunc: handlerFunc,
|
||||
HandlersChain: slices.Clone(root.handlers),
|
||||
})
|
||||
}
|
||||
for _, child := range root.children {
|
||||
|
Loading…
x
Reference in New Issue
Block a user