Skip to content

Commit

Permalink
rename Run to Start
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmood committed Oct 30, 2023
1 parent 70006a0 commit ba64f5b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion group.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (g *Group) Server() http.Handler {

// Run is a shortcut for [Router.Run].
func (g *Group) Run(addr string) error {
return g.router.Start(addr)
return g.router.Run(addr)
}

// Shutdown is a shortcut for [Router.Shutdown].
Expand Down
4 changes: 2 additions & 2 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func (r *Router) ServerHandler() http.Handler {
}))
}

// Start listen on addr with the [Router.ServerHandler].
func (r *Router) Start(addr string) error {
// Run listen on addr with the [Router.ServerHandler].
func (r *Router) Run(addr string) error {
r.sever = &http.Server{
Addr: addr,
Handler: r.ServerHandler(),
Expand Down

0 comments on commit ba64f5b

Please sign in to comment.