MCPcopy
hub / github.com/go-chi/chi / TestWalker

Function TestWalker

tree_test.go:512–523  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

510}
511
512func TestWalker(t *testing.T) {
513 r := bigMux()
514
515 // Walk the muxBig router tree.
516 if err := Walk(r, func(method string, route string, handler http.Handler, middlewares ...func(http.Handler) http.Handler) error {
517 t.Logf("%v %v", method, route)
518
519 return nil
520 }); err != nil {
521 t.Error(err)
522 }
523}
524
525func TestWalkInlineMiddlewaresAcrossSubrouter(t *testing.T) {
526 mw := func(next http.Handler) http.Handler { return next }

Callers

nothing calls this directly

Calls 2

bigMuxFunction · 0.85
WalkFunction · 0.85

Tested by

no test coverage detected