code: func (r *Router) Middleware(fn interface{}) *Router {
  	vfn := reflect.ValueOf(fn)
  	validateMiddleware(vfn, r.contextType)
  	if vfn.Type().NumIn() == 3 {
  		r.middleware = append(r.middleware, &middlewareHandler{Generic: true, GenericMiddleware: fn.(func(ResponseWriter, *Request, NextMiddlewareFunc))})
  	} else {
  		r.middleware = append(r.middleware, &middlewareHandler{Generic: false, DynamicMiddleware: vfn})
  	}
  
  	return r
  }
docs: // Middleware adds the specified middleware tot he router and returns the router.