Skip to content

Commit 099b19a

Browse files
committed
refactor: modified RegisterGroups function signature
1 parent e9aa845 commit 099b19a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

http/factory/controller.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type (
1010
CreateRouter(baseRouter gonethttproute.RouterWrapper, path string) error
1111
GetRouter() gonethttproute.RouterWrapper
1212
RegisterRoutes()
13-
RegisterGroups()
13+
RegisterGroups() error
1414
gonethttproute.RouterWrapper
1515
}
1616

@@ -35,8 +35,7 @@ func (c *Controller) CreateRouter(
3535

3636
// Register the controller routes and groups
3737
c.RegisterRoutes()
38-
c.RegisterGroups()
39-
return nil
38+
return c.RegisterGroups()
4039
}
4140

4241
// GetRouter returns the router
@@ -48,4 +47,6 @@ func (c *Controller) GetRouter() gonethttproute.RouterWrapper {
4847
func (c *Controller) RegisterRoutes() {}
4948

5049
// RegisterGroups registers the groups
51-
func (c *Controller) RegisterGroups() {}
50+
func (c *Controller) RegisterGroups() error {
51+
return nil
52+
}

0 commit comments

Comments
 (0)