From c7b26467d7d96a6dd68ebc133dcc8541121e2c4f Mon Sep 17 00:00:00 2001 From: Willem Delbare Date: Sat, 13 Jan 2024 15:27:02 +0100 Subject: [PATCH] go syntax --- detect/detect.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/detect/detect.go b/detect/detect.go index 3502ea960..6cc8ae080 100644 --- a/detect/detect.go +++ b/detect/detect.go @@ -271,9 +271,8 @@ func (d *Detector) detectRule(fragment Fragment, rule config.Rule) []report.Find loc.endLineIndex = matchIndex[1] } - var full_fragment; - if( len(fragment.Raw) > 250 ) - { + var full_fragment + if( len(fragment.Raw) > 250 ){ full_fragment = strings.TrimSpace(fragment.Raw[0:250]) }else{ full_fragment = strings.TrimSpace(fragment.Raw[0:])