From 44e6c5ba96bbf4df8bacd476f19cf2b48c7f1e21 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Tue, 17 Oct 2023 17:00:15 +0800 Subject: [PATCH] chore: unnecessary guard around call to delete Signed-off-by: guoguangwu --- lib/prom/prom_test.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/prom/prom_test.go b/lib/prom/prom_test.go index 4c07a8cb..71bdb3d3 100644 --- a/lib/prom/prom_test.go +++ b/lib/prom/prom_test.go @@ -79,9 +79,7 @@ func TestMetrics_Observe(t *testing.T) { name, _ := p.Help() nameStr := string(name) - if _, ok := want[nameStr]; ok { - delete(want, nameStr) - } + delete(want, nameStr) } if len(want) > 0 {