-
Notifications
You must be signed in to change notification settings - Fork 646
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
cmd: migrate 'surgery clear-page' command to cobra style command #484
Conversation
cc @mitake @ptabor @serathius @spzala PTAL After this PR gets merged, all surgery commands are migrated to cobra style commands! |
Signed-off-by: Benjamin Wang <[email protected]>
Signed-off-by: Benjamin Wang <[email protected]>
Signed-off-by: Benjamin Wang <[email protected]>
ping @ptabor @serathius PTAL |
func newSurgeryClearPageCommand() *cobra.Command { | ||
var o surgeryClearPageOptions | ||
clearPageCmd := &cobra.Command{ | ||
Use: "clear-page <bbolt-file> [options]", |
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.
Shell we mention --pageId
as mandatory option here ?
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.
Yes, makes sense. We can use cobra.MarkFlagRequired
to mark the field required. We should apply the same restriction for other surgery command as well.
Let me do it as a followup. thx
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.
Thank you !
Linked to #472
All surgery commands are migrated to cobra style commands!