expose ServeMux

This commit is contained in:
2025-07-10 19:05:31 +05:30
parent ddb4b35181
commit eff9d1d285

View File

@@ -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 {