feat: print routes (#1964)

* feat: print rest routes

* feat: print rest routes
This commit is contained in:
Kevin Wan
2022-06-04 13:26:14 +08:00
committed by GitHub
parent 87800419f5
commit b6b96d9dad
3 changed files with 88 additions and 0 deletions

View File

@@ -73,6 +73,11 @@ func (s *Server) AddRoute(r Route, opts ...RouteOption) {
s.AddRoutes([]Route{r}, opts...)
}
// PrintRoutes prints the added routes to stdout.
func (s *Server) PrintRoutes() {
s.ngin.print()
}
// Start starts the Server.
// Graceful shutdown is enabled by default.
// Use proc.SetTimeToForceQuit to customize the graceful shutdown period.