Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type HealthCheckHandler struct {
}

// Handle responds with a 200 by default
func (h *HealthCheckHandler) Handle(w http.ResponseWriter, r *http.Request) {
func (h *HealthCheckHandler) Handle(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
_, _ = w.Write([]byte("Success"))
}
6 changes: 3 additions & 3 deletions router.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ type RouterConfig struct {
// This version returns a mux from the chi project
// as a convenience for cases where custom middleware or additional
// routes need to be configured.
func NewDefaultRouter(conf *RouterConfig) *chi.Mux {
router := chi.NewMux()
func NewDefaultRouter(_ *RouterConfig) *http.ServeMux {
router := http.NewServeMux()
healthCheckHandler := &HealthCheckHandler{}

router.Get("/healthcheck", healthCheckHandler.Handle)
router.HandleFunc("/healthcheck", healthCheckHandler.Handle)

return router
}
Loading