This PR introduces a new StartOffsetProvider interface to enhance the span calculation strategy for detectors where keywords are not prefixes in the credentials. The adjustableSpanCalculator has been updated to utilize this interface, allowing for more precise control over the start index in match spans. Specific detectors can optionally implement this interface to adjust the start index accordingly.
Checklist:
[ ] Tests passing (make test-community)?
[ ] Lint passing (make lint this requires golangci-lint)?
Description:
This PR introduces a new
StartOffsetProvider
interface to enhance the span calculation strategy for detectors where keywords are not prefixes in the credentials. TheadjustableSpanCalculator
has been updated to utilize this interface, allowing for more precise control over the start index in match spans. Specific detectors can optionally implement this interface to adjust the start index accordingly.Checklist:
make test-community
)?make lint
this requires golangci-lint)?