MCPcopy
hub / github.com/gin-gonic/gin / Next

Method Next

context.go:188–196  ·  view source on GitHub ↗

************************************/ *********** FLOW CONTROL ***********/ ************************************/ Next should be used only inside middleware. It executes the pending handlers in the chain inside the calling handler. See example in GitHub.

()

Source from the content-addressed store, hash-verified

186// It executes the pending handlers in the chain inside the calling handler.
187// See example in GitHub.
188func (c *Context) Next() {
189 c.index++
190 for c.index < safeInt8(len(c.handlers)) {
191 if c.handlers[c.index] != nil {
192 c.handlers[c.index](c)
193 }
194 c.index++
195 }
196}
197
198// IsAborted returns true if the current context was aborted.
199func (c *Context) IsAborted() bool {

Callers 15

TestMiddlewareNoRouteFunction · 0.80
TestMiddlewareAbortFunction · 0.80
CustomRecoveryWithWriterFunction · 0.80
TestContextIsAbortedFunction · 0.80
TestInterceptedHeaderFunction · 0.80
TestContextNextFunction · 0.80

Calls 1

safeInt8Function · 0.85

Tested by 15

TestMiddlewareNoRouteFunction · 0.64
TestMiddlewareAbortFunction · 0.64
TestContextIsAbortedFunction · 0.64
TestInterceptedHeaderFunction · 0.64
TestContextNextFunction · 0.64
BenchmarkParallelGithubFunction · 0.64