Skip to content

Commit

Permalink
Update arg usage
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Lord <[email protected]>
  • Loading branch information
mattlord committed Oct 15, 2023
1 parent 8374837 commit 1d9e73d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions go/cmd/vtctldclient/command/vreplication/mount/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var register = &cobra.Command{
Example: `vtctldclient --server localhost:15999 mount register --name ext1 --topo-type etcd2 --topo-server localhost:12379 --topo-root /vitess/global`,
DisableFlagsInUseLine: true,
Aliases: []string{"Register"},
Args: cobra.ExactArgs(1),
Args: cobra.NoArgs,
RunE: commandRegister,
}

Expand All @@ -79,15 +79,15 @@ var unregister = &cobra.Command{
Example: `vtctldclient --server localhost:15999 mount unregister --name ext1`,
DisableFlagsInUseLine: true,
Aliases: []string{"Unregister"},
Args: cobra.ExactArgs(1),
Args: cobra.NoArgs,
RunE: commandUnregister,
}

func commandUnregister(cmd *cobra.Command, args []string) error {
cli.FinishedParsing(cmd)

req := &vtctldatapb.MountUnregisterRequest{
Name: args[0],
Name: mountOptions.Name,
}
_, err := common.GetClient().MountUnregister(common.GetCommandCtx(), req)
if err != nil {
Expand All @@ -103,15 +103,15 @@ var show = &cobra.Command{
Example: `vtctldclient --server localhost:15999 mount show --name ext1`,
DisableFlagsInUseLine: true,
Aliases: []string{"Show"},
Args: cobra.ExactArgs(1),
Args: cobra.NoArgs,
RunE: commandShow,
}

func commandShow(cmd *cobra.Command, args []string) error {
cli.FinishedParsing(cmd)

req := &vtctldatapb.MountShowRequest{
Name: args[0],
Name: mountOptions.Name,
}
resp, err := common.GetClient().MountShow(common.GetCommandCtx(), req)
if err != nil {
Expand Down

0 comments on commit 1d9e73d

Please sign in to comment.