export ShouldVerify (#1962)

This commit is contained in:
ahrav
2023-10-24 07:27:01 -07:00
committed by GitHub
parent 9ae114f92f
commit 0f845c8eee
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -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)
}
}
+1 -1
View File
@@ -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,