MCPcopy Index your code
hub / github.com/coder/coder / mwAssert

Function mwAssert

coderd/httpmw/authz_test.go:91–98  ·  view source on GitHub ↗
(assertF func(req *http.Request))

Source from the content-addressed store, hash-verified

89}
90
91func mwAssert(assertF func(req *http.Request)) func(next http.Handler) http.Handler {
92 return func(next http.Handler) http.Handler {
93 return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
94 assertF(r)
95 next.ServeHTTP(rw, r)
96 })
97 }
98}

Callers 1

TestAsAuthzSystemFunction · 0.85

Calls 1

ServeHTTPMethod · 0.45

Tested by

no test coverage detected