Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetAll now uses Options for it's Options #528

Merged
merged 2 commits into from
May 31, 2024

Conversation

coreyogburn
Copy link
Contributor

Instead of always accepting engine, isEnabled, and isCommunity, GetAllDetections now accepts a variable number of options. Previous call sites have been updated to do the same thing with the new approach. Updated tests.


type GetAllOption func(query string, schemaPrefix string) string

func WithEngine(engine EngineName) GetAllOption {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the other unit tests already covering these returned strings?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not as directly as I'd like. I'll add unit tests to the options.

Instead of always accepting engine, isEnabled, and isCommunity, GetAllDetections now accepts a variable number of options. Previous call sites have been updated to do the same thing with the new approach. Updated tests.
@coreyogburn coreyogburn force-pushed the cogburn/get-all-cleanup branch from 31a0cf3 to ab1fa7d Compare May 31, 2024 16:10
@coreyogburn coreyogburn merged commit 52c1d58 into 2.4/dev May 31, 2024
3 checks passed
@coreyogburn coreyogburn deleted the cogburn/get-all-cleanup branch May 31, 2024 16:37
@github-actions github-actions bot locked and limited conversation to collaborators May 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants