From 307409651f9d31dc165db77cd677c4503942d459 Mon Sep 17 00:00:00 2001 From: WangJun <502554248@qq.com> Date: Wed, 7 Dec 2022 13:35:59 +0800 Subject: [PATCH] remove empty string output (#198) --- plugin.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin.go b/plugin.go index 3317966..48b2e0b 100644 --- a/plugin.go +++ b/plugin.go @@ -127,9 +127,13 @@ func (p Plugin) exec(host string, wg *sync.WaitGroup, errChannel chan error) { case isTimeout = <-doneChan: break loop case outline := <-stdoutChan: - p.log(host, "out:", outline) + if outline != "" { + p.log(host, "out:", outline) + } case errline := <-stderrChan: - p.log(host, "err:", errline) + if errline != "" { + p.log(host, "err:", errline) + } case err = <-errChan: } }