diff --git a/cmd/bbolt/command_inspect.go b/cmd/bbolt/command_inspect.go index 8d34401e1..7f150835a 100644 --- a/cmd/bbolt/command_inspect.go +++ b/cmd/bbolt/command_inspect.go @@ -12,7 +12,7 @@ import ( func newInspectCommand() *cobra.Command { inspectCmd := &cobra.Command{ - Use: "inspect", + Use: "inspect ", Short: "inspect the structure of the database", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/bbolt/command_root.go b/cmd/bbolt/command_root.go index 6308a8cc2..0336ea36c 100644 --- a/cmd/bbolt/command_root.go +++ b/cmd/bbolt/command_root.go @@ -18,7 +18,7 @@ func NewRootCommand() *cobra.Command { rootCmd.AddCommand( newVersionCommand(), - newSurgeryCobraCommand(), + newSurgeryCommand(), newInspectCommand(), newCheckCommand(), ) diff --git a/cmd/bbolt/command_surgery.go b/cmd/bbolt/command_surgery.go index fba5b2e48..c7abfe1dd 100644 --- a/cmd/bbolt/command_surgery.go +++ b/cmd/bbolt/command_surgery.go @@ -17,7 +17,7 @@ var ( ErrSurgeryFreelistAlreadyExist = errors.New("the file already has freelist, please consider to abandon the freelist to forcibly rebuild it") ) -func newSurgeryCobraCommand() *cobra.Command { +func newSurgeryCommand() *cobra.Command { surgeryCmd := &cobra.Command{ Use: "surgery ", Short: "surgery related commands", @@ -52,7 +52,7 @@ func (o *surgeryBaseOptions) Validate() error { func newSurgeryRevertMetaPageCommand() *cobra.Command { var o surgeryBaseOptions revertMetaPageCmd := &cobra.Command{ - Use: "revert-meta-page [options]", + Use: "revert-meta-page ", Short: "Revert the meta page to revert the changes performed by the latest transaction", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -111,7 +111,7 @@ func (o *surgeryCopyPageOptions) Validate() error { func newSurgeryCopyPageCommand() *cobra.Command { var o surgeryCopyPageOptions copyPageCmd := &cobra.Command{ - Use: "copy-page [options]", + Use: "copy-page ", Short: "Copy page from the source page Id to the destination page Id", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -175,7 +175,7 @@ func (o *surgeryClearPageOptions) Validate() error { func newSurgeryClearPageCommand() *cobra.Command { var o surgeryClearPageOptions clearPageCmd := &cobra.Command{ - Use: "clear-page [options]", + Use: "clear-page ", Short: "Clears all elements from the given page, which can be a branch or leaf page", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -242,7 +242,7 @@ func (o *surgeryClearPageElementsOptions) Validate() error { func newSurgeryClearPageElementsCommand() *cobra.Command { var o surgeryClearPageElementsOptions clearElementCmd := &cobra.Command{ - Use: "clear-page-elements [options]", + Use: "clear-page-elements ", Short: "Clears elements from the given page, which can be a branch or leaf page", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/bbolt/command_surgery_freelist.go b/cmd/bbolt/command_surgery_freelist.go index b6cd658d1..9b9da0b48 100644 --- a/cmd/bbolt/command_surgery_freelist.go +++ b/cmd/bbolt/command_surgery_freelist.go @@ -26,7 +26,7 @@ func newSurgeryFreelistCommand() *cobra.Command { func newSurgeryFreelistAbandonCommand() *cobra.Command { var o surgeryBaseOptions abandonFreelistCmd := &cobra.Command{ - Use: "abandon [options]", + Use: "abandon ", Short: "Abandon the freelist from both meta pages", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -61,7 +61,7 @@ func surgeryFreelistAbandonFunc(srcDBPath string, cfg surgeryBaseOptions) error func newSurgeryFreelistRebuildCommand() *cobra.Command { var o surgeryBaseOptions rebuildFreelistCmd := &cobra.Command{ - Use: "rebuild [options]", + Use: "rebuild ", Short: "Rebuild the freelist", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/bbolt/command_surgery_meta.go b/cmd/bbolt/command_surgery_meta.go index ba15dd002..513c1fb2e 100644 --- a/cmd/bbolt/command_surgery_meta.go +++ b/cmd/bbolt/command_surgery_meta.go @@ -34,7 +34,7 @@ func newSurgeryMetaCommand() *cobra.Command { func newSurgeryMetaValidateCommand() *cobra.Command { metaValidateCmd := &cobra.Command{ - Use: "validate [options]", + Use: "validate ", Short: "Validate both meta pages", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { @@ -120,7 +120,7 @@ func (o *surgeryMetaUpdateOptions) Validate() error { func newSurgeryMetaUpdateCommand() *cobra.Command { var o surgeryMetaUpdateOptions metaUpdateCmd := &cobra.Command{ - Use: "update [options]", + Use: "update ", Short: "Update fields in meta pages", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error {