Handler returns the configured HTTP handler (router). Useful for testing with httptest.NewServer.
()
| 2916 | // Handler returns the configured HTTP handler (router). |
| 2917 | // Useful for testing with httptest.NewServer. |
| 2918 | func (s *Server) Handler() http.Handler { |
| 2919 | s.ensureRouter() |
| 2920 | return s.router |
| 2921 | } |
| 2922 | |
| 2923 | // --- helpers --- |
| 2924 |