From 6dfda67731d78430404eeee483202cf2bb933d8e Mon Sep 17 00:00:00 2001 From: Joshua Date: Mon, 22 Apr 2024 19:14:53 -0400 Subject: [PATCH] Fix start span matchers slice flag --- cmd/spancheck/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/spancheck/main.go b/cmd/spancheck/main.go index fdc5450..5c6b87c 100644 --- a/cmd/spancheck/main.go +++ b/cmd/spancheck/main.go @@ -33,7 +33,9 @@ func main() { cfg.EnabledChecks = strings.Split(checkStrings, ",") cfg.IgnoreChecksSignaturesSlice = strings.Split(ignoreCheckSignatures, ",") - cfg.StartSpanMatchersSlice = append(cfg.StartSpanMatchersSlice, strings.Split(extraStartSpanSignatures, ",")...) + if extraStartSpanSignatures != "" { + cfg.StartSpanMatchersSlice = append(cfg.StartSpanMatchersSlice, strings.Split(extraStartSpanSignatures, ",")...) + } singlechecker.Main(spancheck.NewAnalyzerWithConfig(cfg)) }