(app *App, middleware ...func(Ctx) error)
| 827 | } |
| 828 | |
| 829 | func registerTreeManipulationRoutes(app *App, middleware ...func(Ctx) error) { |
| 830 | converted := make([]any, len(middleware)) |
| 831 | for i, h := range middleware { |
| 832 | converted[i] = h |
| 833 | } |
| 834 | |
| 835 | app.Get("/test", func(c Ctx) error { |
| 836 | app.Get("/dynamically-defined", func(c Ctx) error { |
| 837 | return c.SendStatus(StatusOK) |
| 838 | }) |
| 839 | |
| 840 | app.RebuildTree() |
| 841 | |
| 842 | return c.SendStatus(StatusOK) |
| 843 | }, converted...) |
| 844 | } |
| 845 | |
| 846 | func verifyRequest(tb testing.TB, app *App, path string, expectedStatus int) *http.Response { |
| 847 | tb.Helper() |
no test coverage detected