Revert "Sort FindDetectorMatches output for deterministic detector ordering"
This reverts commit 310c17fc20.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user