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

cmd: migrate 'surgery clear-page' command to cobra style command #484

Merged
merged 3 commits into from
May 16, 2023
Merged

cmd: migrate 'surgery clear-page' command to cobra style command #484

merged 3 commits into from
May 16, 2023

Conversation

ahrtr
Copy link
Member

@ahrtr ahrtr commented May 7, 2023

Linked to #472

All surgery commands are migrated to cobra style commands!

@ahrtr
Copy link
Member Author

ahrtr commented May 7, 2023

cc @mitake @ptabor @serathius @spzala PTAL

After this PR gets merged, all surgery commands are migrated to cobra style commands!

ahrtr added 3 commits May 9, 2023 08:27
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
Signed-off-by: Benjamin Wang <wachao@vmware.com>
@ahrtr
Copy link
Member Author

ahrtr commented May 9, 2023

ping @ptabor @serathius PTAL

@ahrtr ahrtr changed the title cmd: migrate 'surgery copy-page' command to cobra style command cmd: migrate 'surgery clear-page' command to cobra style command May 15, 2023
func newSurgeryClearPageCommand() *cobra.Command {
var o surgeryClearPageOptions
clearPageCmd := &cobra.Command{
Use: "clear-page <bbolt-file> [options]",
Copy link
Contributor

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 ?

Copy link
Member Author

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

Copy link
Contributor

@ptabor ptabor left a comment

Choose a reason for hiding this comment

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

Thank you !

@ahrtr ahrtr merged commit bd6b79c into etcd-io:master May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants