From 683ad2235849b75340a19b491f68ea00f89ec9d2 Mon Sep 17 00:00:00 2001 From: Pavel Sviderski Date: Tue, 13 May 2025 10:24:16 +1000 Subject: [PATCH] chore: remove extra [FLAGS] from volume commands help, add SERVICE for inspect --- cmd/uncloud/service/inspect.go | 2 +- cmd/uncloud/volume/create.go | 2 +- cmd/uncloud/volume/inspect.go | 2 +- cmd/uncloud/volume/ls.go | 2 +- cmd/uncloud/volume/rm.go | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/uncloud/service/inspect.go b/cmd/uncloud/service/inspect.go index 2b39d093..b8910ca3 100644 --- a/cmd/uncloud/service/inspect.go +++ b/cmd/uncloud/service/inspect.go @@ -22,7 +22,7 @@ type inspectOptions struct { func NewInspectCommand() *cobra.Command { opts := inspectOptions{} cmd := &cobra.Command{ - Use: "inspect", + Use: "inspect SERVICE", Short: "Display detailed information on a service.", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/uncloud/volume/create.go b/cmd/uncloud/volume/create.go index 2fcc15b5..e4fdc190 100644 --- a/cmd/uncloud/volume/create.go +++ b/cmd/uncloud/volume/create.go @@ -26,7 +26,7 @@ func NewCreateCommand() *cobra.Command { opts := createOptions{} cmd := &cobra.Command{ - Use: "create [FLAGS] VOLUME_NAME", + Use: "create VOLUME_NAME", Short: "Create a volume on a specific machine.", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/uncloud/volume/inspect.go b/cmd/uncloud/volume/inspect.go index f5239a6c..d0a5454f 100644 --- a/cmd/uncloud/volume/inspect.go +++ b/cmd/uncloud/volume/inspect.go @@ -20,7 +20,7 @@ func NewInspectCommand() *cobra.Command { opts := inspectOptions{} cmd := &cobra.Command{ - Use: "inspect [FLAGS] VOLUME_NAME", + Use: "inspect VOLUME_NAME", Short: "Display detailed information on a volume.", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/uncloud/volume/ls.go b/cmd/uncloud/volume/ls.go index 71aaf11e..de237f37 100644 --- a/cmd/uncloud/volume/ls.go +++ b/cmd/uncloud/volume/ls.go @@ -23,7 +23,7 @@ func NewListCommand() *cobra.Command { opts := listOptions{} cmd := &cobra.Command{ - Use: "ls [FLAGS]", + Use: "ls", Aliases: []string{"list"}, Short: "List volumes across all machines in the cluster.", RunE: func(cmd *cobra.Command, args []string) error { diff --git a/cmd/uncloud/volume/rm.go b/cmd/uncloud/volume/rm.go index 148769f9..e877d03a 100644 --- a/cmd/uncloud/volume/rm.go +++ b/cmd/uncloud/volume/rm.go @@ -21,7 +21,7 @@ func NewRemoveCommand() *cobra.Command { opts := removeOptions{} cmd := &cobra.Command{ - Use: "rm [FLAGS] VOLUME_NAME [VOLUME_NAME...]", + Use: "rm VOLUME_NAME [VOLUME_NAME...]", Aliases: []string{"remove", "delete"}, Short: "Remove one or more volumes.", Long: "Remove one or more volumes. You cannot remove a volume that is in use by a container.",