From 5f208cd20d36b070b04ce1c848411dc5293150b6 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 6 May 2024 20:36:08 +0300 Subject: fix lint warnings --- internal/server/health/health.go | 3 ++- internal/server/health/health_test.go | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'internal/server') diff --git a/internal/server/health/health.go b/internal/server/health/health.go index d87bd3d..edc03a0 100644 --- a/internal/server/health/health.go +++ b/internal/server/health/health.go @@ -42,12 +42,13 @@ func (a alert) String() string { type Status struct { alerts map[string]alert - mu sync.Mutex + mu *sync.Mutex } func NewStatus() Status { return Status{ alerts: make(map[string]alert), + mu: &sync.Mutex{}, } } diff --git a/internal/server/health/health_test.go b/internal/server/health/health_test.go index 1723d42..babebff 100644 --- a/internal/server/health/health_test.go +++ b/internal/server/health/health_test.go @@ -6,10 +6,10 @@ func TestHealthStatus(t *testing.T) { t.Parallel() h := NewStatus() - h.Set(warning, "fooService", "this is not good") - h.Set(critical, "barService", "this is not good either") - h.Set(warning, "bazService", "urgh!") - h.Set(unknown, "bazService", "don't know what happened here!") + h.Set(Warning, "fooService", "this is not good") + h.Set(Critical, "barService", "this is not good either") + h.Set(Warning, "bazService", "urgh!") + h.Set(Unknown, "bazService", "don't know what happened here!") h.Clear("fooService") result := h.String() -- cgit v1.2.3