mirror of
https://gitee.com/johng/gf.git
synced 2024-11-29 18:57:44 +08:00
no printing internal middleware for ghttp.Server
(#3271)
This commit is contained in:
parent
73fbca40ca
commit
b4f6f06ab5
@ -161,6 +161,7 @@ const (
|
||||
specialMethodNameShut = "Shut"
|
||||
specialMethodNameIndex = "Index"
|
||||
defaultEndpointPort = 80
|
||||
noPrintInternalRoute = "internalMiddlewareServerTracing"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -301,6 +301,11 @@ func (s *Server) doRouterMapDump() {
|
||||
handlerName = gstr.TrimRightStr(item.Handler.Name, "-fm")
|
||||
middlewares = gstr.SplitAndTrim(item.Middleware, ",")
|
||||
)
|
||||
|
||||
// No printing special internal middleware that may lead confused.
|
||||
if gstr.SubStrFromREx(handlerName, ".") == noPrintInternalRoute {
|
||||
continue
|
||||
}
|
||||
for k, v := range middlewares {
|
||||
middlewares[k] = gstr.TrimRightStr(v, "-fm")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user