MCPcopy
hub / github.com/gofiber/fiber / registerTreeManipulationRoutes

Function registerTreeManipulationRoutes

router_test.go:829–844  ·  view source on GitHub ↗
(app *App, middleware ...func(Ctx) error)

Source from the content-addressed store, hash-verified

827}
828
829func 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
846func verifyRequest(tb testing.TB, app *App, path string, expectedStatus int) *http.Response {
847 tb.Helper()

Calls 3

RebuildTreeMethod · 0.80
GetMethod · 0.65
SendStatusMethod · 0.65

Tested by

no test coverage detected