code: func (router *router) flush() {
  	// first copy all middlewares to top-level routes
  	for method, routesSlice := range router.routes {
  		for i, route := range routesSlice {
  
  			route.fnChain = compose(merge(
  				router.middlewares,
  				route.middlewares,
  				[]appliable{route.fn},
  			))
  
  			router.routes[method][i] = route
  		}
  	}
  
  	// then copy all middlewares for region level routes
  	// this will copy all b/a from router and region
  	// so at the end all b/a for route will be placed directly in route
  	//
  	// mr = maybeRegion
  	for mr := router.regions.Front(); mr != nil; mr = mr.Next() {
  		region, ok := mr.Value.(*Region)
  		if !ok {
  			log.Error("cannot convert element to region")
  			continue
  		}
  
  		for method, routesSlice := range region.routes {
  			for _, route := range routesSlice {
  
  				route.fnChain = compose(merge(
  					router.middlewares,
  					region.middlewares,
  					route.middlewares,
  					[]appliable{route.fn},
  				))
  
  				router.routes[method] = append(router.routes[method], route)
  			}
  
  			// remove method key from region (GET, POST,...)
  			delete(region.routes, method)
  		}
  	}
  
  	// remove regions, we don't need them anymore
  	router.regions.Init()
  }
docs: // forcing all middlewares to copy to appropriate routes
  // also cleans up intrnal structures