Skip to content

Commit

Permalink
export ShouldVerify (#1962)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrav authored Oct 24, 2023
1 parent 9ae114f commit 0f845c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/engine/ahocorasickcore.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 0f845c8

Please sign in to comment.