Closed uppalabharath closed 3 years ago
According to this, c.Next()
has the sole purpose of run code below its call, after next handlers executions.
Also, even if you run c.Next()
conditionally, the next handler will run anyways. You should use c.Abort()
or c.AbortWithStatus()
in this case.
Thanks @MatheusZabin
Per gin's documentation every middleware should call c.Next() to pass the request to the next middleware registered. But I did not find the usage / call of Next() in any of the code.
May I know how this is working? Relevant code: