From 9d83460987bd752f5453a095617a4d3dd8e3b469 Mon Sep 17 00:00:00 2001 From: Grygoriy Ensary Date: Fri, 15 May 2026 11:42:16 -0500 Subject: [PATCH 1/3] https://sonarcloud.io/project/issues?issueStatuses=OPEN&id=asecurityteam_runhttp&open=AZst050l358L6je7ETt8 unused conf parameter. Keeping to keep method signature compatibility by consumers. According to the code search, the contract is used by 10 different internal services, all with empty config object. --- router.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/router.go b/router.go index ad8795d..d513e88 100644 --- a/router.go +++ b/router.go @@ -1,7 +1,7 @@ package runhttp import ( - "github.com/go-chi/chi/v5" + "net/http" ) // RouterConfig is used as a simple default for NewDefaultRouter @@ -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 } From b5a0178cd45b32f8373ff4a96c2d78cb2bd81560 Mon Sep 17 00:00:00 2001 From: Grygoriy Ensary Date: Fri, 15 May 2026 11:42:23 -0500 Subject: [PATCH 2/3] https://sonarcloud.io/project/issues?issueStatuses=OPEN&id=asecurityteam_runhttp&open=AZst052-358L6je7ETt9 warning re: unused func argument --- healthcheck.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/healthcheck.go b/healthcheck.go index d9d359e..a2efc22 100644 --- a/healthcheck.go +++ b/healthcheck.go @@ -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")) } From 1dc5dd576dc7a204eb22a04bbbf6a4e1294bc442 Mon Sep 17 00:00:00 2001 From: Grygoriy Ensary Date: Fri, 15 May 2026 11:44:58 -0500 Subject: [PATCH 3/3] remove drive-by change to net/http --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index d513e88..7526950 100644 --- a/router.go +++ b/router.go @@ -1,7 +1,7 @@ package runhttp import ( - "net/http" + "github.com/go-chi/chi/v5" ) // RouterConfig is used as a simple default for NewDefaultRouter