MCPcopy Create free account
hub / github.com/kataras/iris / FromStdWithNext

Function FromStdWithNext

core/handlerconv/from_std.go:60–69  ·  view source on GitHub ↗

FromStdWithNext receives a standar handler - middleware form - and returns a compatible context.Handler wrapper.

(h func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc))

Source from the content-addressed store, hash-verified

58// FromStdWithNext receives a standar handler - middleware form - and returns a
59// compatible context.Handler wrapper.
60func FromStdWithNext(h func(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)) context.Handler {
61 return func(ctx *context.Context) {
62 next := func(w http.ResponseWriter, r *http.Request) {
63 ctx.ResetRequest(r)
64 ctx.Next()
65 }
66
67 h(ctx.ResponseWriter(), ctx.Request(), next)
68 }
69}

Callers 2

TestFromStdWithNextFunction · 0.92
FromStdFunction · 0.85

Calls 5

ResetRequestMethod · 0.80
NextMethod · 0.80
ResponseWriterMethod · 0.80
RequestMethod · 0.80
hFunction · 0.50

Tested by 1

TestFromStdWithNextFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…