ax(mining): replace prose comment on ServiceStartup with usage example
AX Principle 2 — comments show HOW with real values, not describe WHAT the function signature already says. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
74f310b10c
commit
3e2f8f9f15
1 changed files with 1 additions and 2 deletions
|
|
@ -572,8 +572,7 @@ func (s *Service) Stop() {
|
|||
}
|
||||
}
|
||||
|
||||
// ServiceStartup initializes the router and starts the HTTP server.
|
||||
// For embedding without a standalone server, use InitRouter() instead.
|
||||
// svc.ServiceStartup(ctx) // blocks until ctx is cancelled; use InitRouter() to embed without a server
|
||||
func (s *Service) ServiceStartup(ctx context.Context) error {
|
||||
s.InitRouter()
|
||||
s.Server.Handler = s.Router
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue