From 35c7bbb5b4d08bf94fd1f8595e246389d3fe6f36 Mon Sep 17 00:00:00 2001 From: Yasen Pramatarov Date: Tue, 22 Oct 2024 17:43:31 +0300 Subject: [PATCH] Typo fix --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 5e41d89..2525cef 100644 --- a/main.go +++ b/main.go @@ -280,12 +280,12 @@ func statusHandler(config Config, w http.ResponseWriter, r *http.Request) { for key, value := range result { if strings.HasSuffix(key, "_state") { // If there is "*_state": "error" - it's accessible, but unavailable - if valueStr, ok := value(string); ok && valueStr == "error" { + if valueStr, ok := value.(string); ok && valueStr == "error" { available = false break } // If there is "*_state": "running" - it's OK - if valueStr, ok := value(string); ok && valueStr == "running" { + if valueStr, ok := value.(string); ok && valueStr == "running" { available = true break }