From d40bed4d3efcdecea8efa7b50604506ce70bda99 Mon Sep 17 00:00:00 2001 From: Ivan Kalita Date: Thu, 20 Dec 2018 18:17:09 +0100 Subject: [PATCH] Fix of the healthz endpoint handler According to #8. Signed-off-by: Ivan Kalita --- pkg/restapi/configure_goldpinger.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/restapi/configure_goldpinger.go b/pkg/restapi/configure_goldpinger.go index 7da276f..bb5abf7 100644 --- a/pkg/restapi/configure_goldpinger.go +++ b/pkg/restapi/configure_goldpinger.go @@ -75,9 +75,9 @@ func configureAPI(api *operations.GoldpingerAPI) http.Handler { goldpinger.CountCall("received", "healthz") healthResult := goldpinger.HealthCheck() if *healthResult.OK { - return operations.NewHealthzServiceUnavailable().WithPayload(healthResult) - } else { return operations.NewHealthzOK().WithPayload(healthResult) + } else { + return operations.NewHealthzServiceUnavailable().WithPayload(healthResult) } })