mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-23 01:57:55 +08:00
Context.Next() - format to while style
This commit is contained in:
parent
53263e4ba2
commit
7c5e99b78d
@ -105,8 +105,9 @@ func (c *Context) Handler() HandlerFunc {
|
|||||||
// See example in GitHub.
|
// See example in GitHub.
|
||||||
func (c *Context) Next() {
|
func (c *Context) Next() {
|
||||||
c.index++
|
c.index++
|
||||||
for ; c.index < int8(len(c.handlers)); c.index++ {
|
for c.index < int8(len(c.handlers)) {
|
||||||
c.handlers[c.index](c)
|
c.handlers[c.index](c)
|
||||||
|
c.index++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user