Abort the Middleware Flow

You can abort the middleware flow in two ways.

Way One

func customMiddleware(ctx *Context, m *Middleware) {
// do your logic before and have control flag to
// whether to call next middleware or not
goodToProceed := false
// continue the chain
if goodToProceed {
m.Next(ctx)
}
}