-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: aod cli do/cleanup command #52
Conversation
// Run Cleanup instead of Do if true. | ||
Cleanup bool |
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.
Sorry, I don't think this is the correct architecture. We should have a "do" command and a "cleanup" command. Branching logic based off of a boolean feels like a design smell.
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.
In this case, what about make it a flag. so the commands are like do: aod cli handle -path <path/to/file.yaml>
, cleanup: aod cli handle -path <path/to/file.yaml> -cleanup
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.
We discussed similar issues in #52 (comment). Maybe it is still worthwhile to have a wrapper layer like "do": &CLIDoCommand{CLIHandleCommand{dofunc(ctx, *v1alpha1.CLIRequest) error}}, "cleanup": &CLICleanupCommand{CLIHandleCommand{cleanupfunc(ctx, *v1alpha1.CLIRequest) error}}
now?
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.
I think this might be better in fact: #55, thank you both! Let me know what you think.
No description provided.