feat: support **struct in mapping (#2784)

* feat: support **struct in mapping

* chore: fix test failure
This commit is contained in:
Kevin Wan
2023-01-12 20:45:32 +08:00
committed by GitHub
parent 367afb544c
commit 4d7fa08b0b
6 changed files with 179 additions and 116 deletions

View File

@@ -118,7 +118,7 @@ func (ng *engine) buildChainWithNativeMiddlewares(fr featuredRoutes, route Route
chn := chain.New()
if ng.conf.Middlewares.Trace {
chn = chn.Append(handler.TracingHandler(ng.conf.Name,
chn = chn.Append(handler.TraceHandler(ng.conf.Name,
route.Path,
handler.WithTraceIgnorePaths(ng.conf.TraceIgnorePaths)))
}
@@ -204,7 +204,7 @@ func (ng *engine) getShedder(priority bool) load.Shedder {
func (ng *engine) notFoundHandler(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
chn := chain.New(
handler.TracingHandler(ng.conf.Name,
handler.TraceHandler(ng.conf.Name,
"",
handler.WithTraceIgnorePaths(ng.conf.TraceIgnorePaths)),
ng.getLogHandler(),