-
Notifications
You must be signed in to change notification settings - Fork 220
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
refactor: remove global variables for all commands #572
base: main
Are you sure you want to change the base?
refactor: remove global variables for all commands #572
Conversation
Thanks for the contribution, this makes a lot of sense! Do you know if we have the same problem for other commands? If yes it would make sense to fix it for others as well |
Yes, I see this in other commands. I can refactor them as well |
Accidentally closed the PR with a misclick 😑, done for all commands you can have a look and give me your feedback :) |
return errors.New("pass the ID of the technique to clean up, or --all") | ||
} | ||
return nil | ||
if len(args) == 0 && !flagCleanupAll { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be flagCleanupAll
like before?
} | ||
|
||
// Ensure the technique IDs are valid | ||
_, err := resolveTechniques(args) | ||
if len(args) > 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this check? (it wasn'tthere before)
What does this PR do?
This PR refactors the detonate_cmd.go file by removing the use of global variables, which improves code maintainability and readability.
Motivation
This is my first contribution to a Datadog repository, and I'm eager to get started on security in the cloud and security in general.
Checklist