From 2bcb4d9f5216e339d23993582daa7927b0a08d11 Mon Sep 17 00:00:00 2001 From: Mya Date: Wed, 26 Oct 2022 20:50:38 +0200 Subject: [PATCH] chore(common.shim): check err of s.writeProcessedMetrics for the linter (#12103) --- plugins/common/shim/input.go | 5 ++++- plugins/common/shim/processor.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/plugins/common/shim/input.go b/plugins/common/shim/input.go index a2956c3e1..7d3ab9b7f 100644 --- a/plugins/common/shim/input.go +++ b/plugins/common/shim/input.go @@ -54,7 +54,10 @@ func (s *Shim) RunInput(pollInterval time.Duration) error { wg := sync.WaitGroup{} wg.Add(1) go func() { - s.writeProcessedMetrics() + err := s.writeProcessedMetrics() + if err != nil { + s.log.Warnf("%s", err) + } wg.Done() }() diff --git a/plugins/common/shim/processor.go b/plugins/common/shim/processor.go index 4d16ab299..f86330563 100644 --- a/plugins/common/shim/processor.go +++ b/plugins/common/shim/processor.go @@ -44,7 +44,10 @@ func (s *Shim) RunProcessor() error { wg := sync.WaitGroup{} wg.Add(1) go func() { - s.writeProcessedMetrics() + err := s.writeProcessedMetrics() + if err != nil { + s.log.Warnf("%s", err) + } wg.Done() }()