v0.0.340
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled

This commit is contained in:
2023-12-07 14:42:25 +01:00
parent 68e63a9cf6
commit 1c143921e6
2 changed files with 6 additions and 5 deletions

View File

@@ -129,7 +129,7 @@ func (w *GinWrapper) DebugPrintRoutes() {
spec.Method,
spec.URL,
strings.Join(langext.ArrMap(spec.Middlewares, w.cleanMiddlewareName), " -> "),
spec.Handler,
w.cleanMiddlewareName(spec.Handler),
}
lines = append(lines, line)
@@ -140,9 +140,10 @@ func (w *GinWrapper) DebugPrintRoutes() {
pad[3] = mathext.Max(pad[3], len(line[3]))
}
fmt.Printf("Gin-Routes:")
for _, line := range lines {
fmt.Printf("Gin-Route: %s %s --> %s --> %s\n",
fmt.Printf(" %s %s --> %s --> %s\n",
langext.StrPadRight("["+line[0]+"]", " ", pad[0]+2),
langext.StrPadRight(line[1], " ", pad[1]),
langext.StrPadRight(line[2], " ", pad[2]),
@@ -165,7 +166,7 @@ func (w *GinWrapper) cleanMiddlewareName(fname string) string {
fname = "[BodyBuffer]"
}
skipPrefixes := []string{"api.(*Handler).", "api."}
skipPrefixes := []string{"api.(*Handler).", "api.", "ginext.", "handler.", "admin-app.", "employee-app.", "employer-app."}
for _, pfx := range skipPrefixes {
if strings.HasPrefix(fname, pfx) {
fname = fname[len(pfx):]