title: Bind mutiple routers - Golang Gorilla Mux
body: <p>I have the following grouped routes, that use different middlewares</p>
  <pre class="lang-golang prettyprint-override"><code>func userRoutes(handlers *Handler) *mux.Router {
      router := mux.NewRouter()
  
      // Routes here
      router.HandleFunc(&quot;/accounts&quot;, handlers.ListAccounts).Name(&quot;list-account&quot;)
      router.HandleFunc(&quot;/accounts/{id}&quot;, handlers.SingleAccount).Name(&quot;single-account&quot;)
      
      // Middleware registration
      router.Use(
          middleware.Logger,)
      return router
  }
  
  func staffRoutes(handlers *Handler) *mux.Router {
      router := mux.NewRouter()
  
      // Routes here
  
      // Middleware registration
      router.Use()
      return router
  }
  
  func adminRoutes(handlers *Handler) *mux.Router {
      router := mux.NewRouter()
  
      // Routes here
  
      // Middleware registration
      router.Use()
      return router
  }
  </code></pre>
  <p>How do I bind these to a single router and still have the middleware isolated in each group?</p>