Fix of the healthz endpoint handler

According to #8.

Signed-off-by: Ivan Kalita <kaduev13@gmail.com>
This commit is contained in:
Ivan Kalita
2018-12-20 18:17:09 +01:00
parent ebbe41f4ef
commit d40bed4d3e

View File

@@ -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)
}
})