Revert "Sort FindDetectorMatches output for deterministic detector ordering"

This reverts commit 310c17fc20.
This commit is contained in:
Cursor Agent
2026-02-24 07:58:15 +00:00
parent 310c17fc20
commit ddbc3d7f8d
-12
View File
@@ -2,8 +2,6 @@ package ahocorasick
import (
"bytes"
"cmp"
"slices"
"strings"
ahocorasick "github.com/BobuSumisu/aho-corasick"
@@ -283,16 +281,6 @@ func (ac *Core) FindDetectorMatches(chunkData []byte) []*DetectorMatch {
uniqueDetectors = append(uniqueDetectors, detectorMatch)
}
slices.SortFunc(uniqueDetectors, func(a, b *DetectorMatch) int {
if c := cmp.Compare(a.Key.detectorType, b.Key.detectorType); c != 0 {
return c
}
if c := cmp.Compare(a.Key.version, b.Key.version); c != 0 {
return c
}
return cmp.Compare(a.Key.customDetectorName, b.Key.customDetectorName)
})
return uniqueDetectors
}