expose ServeMux
This commit is contained in:
@@ -20,6 +20,11 @@ func NewRouter() *Router {
|
||||
return r
|
||||
}
|
||||
|
||||
// DO NOT USE it for routing, exposed only for edge cases.
|
||||
func (r *Router) ServeMux() *http.ServeMux {
|
||||
return r.mux
|
||||
}
|
||||
|
||||
// Use will register middleware(s) with router stack
|
||||
func (r *Router) Use(h ...func(http.Handler) http.Handler) {
|
||||
if r == nil {
|
||||
|
Reference in New Issue
Block a user