More middleware updates.

This commit is contained in:
Travis Reeder
2017-07-13 14:40:36 -07:00
parent 6d2c503010
commit c605317250
4 changed files with 97 additions and 18 deletions

View File

@@ -108,9 +108,6 @@ func (c *middlewareContextImpl) Index() int {
func (s *Server) middlewareWrapperFunc(ctx context.Context) gin.HandlerFunc {
return func(c *gin.Context) {
if len(s.middlewares) == 0 {
return
}
// TODO: we should get rid of this, gin context and middleware context both implement context, don't need a third one here
ctx = c.MustGet("ctx").(context.Context)
fctx := &middlewareContextImpl{Context: ctx}