From 0f845c8eeefe08d5d490d2eb5f7ed18d13c77dc3 Mon Sep 17 00:00:00 2001 From: ahrav Date: Tue, 24 Oct 2023 07:27:01 -0700 Subject: [PATCH] export ShouldVerify (#1962) --- pkg/engine/ahocorasickcore.go | 4 ++-- pkg/engine/engine.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/engine/ahocorasickcore.go b/pkg/engine/ahocorasickcore.go index 79bb1fe3..2e0fa5f8 100644 --- a/pkg/engine/ahocorasickcore.go +++ b/pkg/engine/ahocorasickcore.go @@ -21,7 +21,7 @@ type detectorKey struct { // DetectorInfo is used to store a detector and whether it should be verified. type DetectorInfo struct { detectors.Detector - shouldVerify bool + ShouldVerify bool } // AhoCorasickCore encapsulates the operations and data structures used for keyword matching via the @@ -57,7 +57,7 @@ func (ac *AhoCorasickCore) Setup(ctx context.Context) { for verify, detectorsSet := range ac.detectors { for _, d := range detectorsSet { key := createDetectorKey(d) - ac.detectorTypeToDetectorInfo[key] = DetectorInfo{Detector: d, shouldVerify: verify} + ac.detectorTypeToDetectorInfo[key] = DetectorInfo{Detector: d, ShouldVerify: verify} keywords = ac.extractAndMapKeywords(d, key, keywords) } } diff --git a/pkg/engine/engine.go b/pkg/engine/engine.go index 2199597f..19af7dd2 100644 --- a/pkg/engine/engine.go +++ b/pkg/engine/engine.go @@ -475,7 +475,7 @@ func (e *Engine) detectorWorker(ctx context.Context) { } for k, detector := range chunkSpecificDetectors { - decoded.Chunk.Verify = detector.shouldVerify + decoded.Chunk.Verify = detector.ShouldVerify wgDetect.Add(1) e.detectableChunksChan <- detectableChunk{ chunk: *decoded.Chunk,