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

Method HandlerIndex

context/context.go:561–568  ·  view source on GitHub ↗

HandlerIndex sets the current index of the current context's handlers chain. If n < 0 or the current handlers length is 0 then it just returns the current handler index without change the current index. Look Handlers(), Next() and StopExecution() too.

(n int)

Source from the content-addressed store, hash-verified

559//
560// Look Handlers(), Next() and StopExecution() too.
561func (ctx *Context) HandlerIndex(n int) (currentIndex int) {
562 if n < 0 || n > len(ctx.handlers)-1 {
563 return ctx.currentHandlerIndex
564 }
565
566 ctx.currentHandlerIndex = n
567 return n
568}
569
570// Proceed is an alternative way to check if a particular handler
571// has been executed.

Callers 10

SkipMethod · 0.95
ServeHTTPMethod · 0.80
HandlerMethod · 0.80
PanicRecoveryErrorFunction · 0.80
overlapRouteFunction · 0.80
FireErrorCodeMethod · 0.80
TestResumeExecutionFunction · 0.80
NewConditionalHandlerFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestResumeExecutionFunction · 0.64