refactor(smalltrip): rename handleRouter to handleGroup

This commit is contained in:
Guz
2025-02-26 19:30:06 -03:00
parent ee3e6c9a90
commit 753a4bb19e

View File

@@ -62,7 +62,7 @@ func (r *router) Handle(pattern string, handler http.Handler) {
if router, ok := handler.(RouteGroup); ok { if router, ok := handler.(RouteGroup); ok {
r.log.Debug("Route has nested router as handler, handling router's routes") r.log.Debug("Route has nested router as handler, handling router's routes")
r.handleRouter(pattern, router) r.handleGroup(pattern, router)
return return
} }
@@ -108,7 +108,7 @@ func (r *router) Routes() []Route {
return rs return rs
} }
func (r *router) handleRouter(pattern string, group RouteGroup) { func (r *router) handleGroup(pattern string, group RouteGroup) {
r.assert.NotNil(group, "Router should not be nil, invalid state.") r.assert.NotNil(group, "Router should not be nil, invalid state.")
r.assert.NotZero(pattern, "Pattern should not be empty, invalid state.") r.assert.NotZero(pattern, "Pattern should not be empty, invalid state.")
r.assert.NotNil(r.mux) r.assert.NotNil(r.mux)