StopWithStatus stops the handlers chain and writes the "statusCode". If the status code is a failure one then it will also fire the specified error code handler.
(statusCode int)
| 783 | // If the status code is a failure one then |
| 784 | // it will also fire the specified error code handler. |
| 785 | func (ctx *Context) StopWithStatus(statusCode int) { |
| 786 | ctx.StopExecution() |
| 787 | ctx.StatusCode(statusCode) |
| 788 | } |
| 789 | |
| 790 | // StopWithText stops the handlers chain and writes the "statusCode" |
| 791 | // among with a fmt-style text of "format" and optional arguments. |