RouterProvider

RouterProvider is executed when the torque Controller is first initialized. Using the given Router interface, one can register additional handlers, middleware, etc. Note that the RouterProvider is not a middleware, but a way to add sub-routes to your Controller implementation. Passing a Controller to r.Handle creates a parent-child relationship between the two Controllers, enabling features such as outlet rendering. Controllers can be nested infinitely at the cost of 1 closure. Vanilla http.Handlers can be passed to r.Handle as well. Note that these are considered 'leaf nodes' in the router tree and will not be able to render outlets, even if the handler wraps a Controller. Best practice is to pass the result of torque.MustNew directly to r.Handle.