From b6c4769db3e4302cf574bf179df92f958e612f68 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Wed, 10 Apr 2024 19:57:46 +0200 Subject: [PATCH] Remove stray error check --- collectors/customCmdMetric.go | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/collectors/customCmdMetric.go b/collectors/customCmdMetric.go index e89ea54..ae205f1 100644 --- a/collectors/customCmdMetric.go +++ b/collectors/customCmdMetric.go @@ -99,10 +99,7 @@ func (m *CustomCmdCollector) Read(interval time.Duration, output chan lp.CCMetri continue } - y := lp.FromInfluxMetric(c) - if err == nil { - output <- y - } + output <- lp.FromInfluxMetric(c) } } for _, file := range m.files { @@ -121,10 +118,7 @@ func (m *CustomCmdCollector) Read(interval time.Duration, output chan lp.CCMetri if skip { continue } - y := lp.FromInfluxMetric(f) - if err == nil { - output <- y - } + output <- lp.FromInfluxMetric(f) } } }