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

Function Test_AddRoute_MergeHandlers

router_test.go:2076–2085  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

2074}
2075
2076func Test_AddRoute_MergeHandlers(t *testing.T) {
2077 t.Parallel()
2078 app := New()
2079 count := func(_ Ctx) error { return nil }
2080 app.Get("/merge", count)
2081 app.Get("/merge", count)
2082
2083 require.Len(t, app.stack[app.methodInt(MethodGet)], 1)
2084 require.Len(t, app.stack[app.methodInt(MethodGet)][0].Handlers, 2)
2085}
2086
2087func Benchmark_App_RebuildTree_Parallel(b *testing.B) {
2088 b.ReportAllocs()

Callers

nothing calls this directly

Calls 4

methodIntMethod · 0.80
NewFunction · 0.70
GetMethod · 0.65
LenMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…