refactor: clean up code to pass go lint test

This commit is contained in:
Jonas Kaninda
2024-11-15 08:57:27 +01:00
parent 28b7643f0c
commit db590a2cfc
10 changed files with 20 additions and 47 deletions

View File

@@ -61,7 +61,6 @@ func ProxyErrorHandler(w http.ResponseWriter, r *http.Request, err error) {
if err != nil {
return
}
return
}
// HealthCheckHandler handles health check of routes
@@ -77,8 +76,9 @@ func (heathRoute HealthCheckRoute) HealthCheckHandler(w http.ResponseWriter, r *
if err != nil {
if heathRoute.DisableRouteHealthCheckError {
routes = append(routes, HealthCheckRouteResponse{Name: health.Name, Status: "unhealthy", Error: "Route healthcheck errors disabled"})
} else {
routes = append(routes, HealthCheckRouteResponse{Name: health.Name, Status: "unhealthy", Error: "Error: " + err.Error()})
}
routes = append(routes, HealthCheckRouteResponse{Name: health.Name, Status: "unhealthy", Error: "Error: " + err.Error()})
} else {
logger.Debug("Route %s is healthy", health.Name)
routes = append(routes, HealthCheckRouteResponse{Name: health.Name, Status: "healthy", Error: ""})