diff --git a/pkg/engine/ahocorasick/ahocorasickcore.go b/pkg/engine/ahocorasick/ahocorasickcore.go index 80fe8cf99..c6f97da14 100644 --- a/pkg/engine/ahocorasick/ahocorasickcore.go +++ b/pkg/engine/ahocorasick/ahocorasickcore.go @@ -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 }