Handler returns the configured HTTP handler (router). Useful for testing with httptest.NewServer.
()
| 3009 | // Handler returns the configured HTTP handler (router). |
| 3010 | // Useful for testing with httptest.NewServer. |
| 3011 | func (s *Server) Handler() http.Handler { |
| 3012 | s.ensureRouter() |
| 3013 | return s.router |
| 3014 | } |
| 3015 | |
| 3016 | // --- helpers --- |
| 3017 |