From e6df331fb8bc727b0ca76f351661c1b936be19f0 Mon Sep 17 00:00:00 2001 From: Pavel Sviderski Date: Thu, 31 Oct 2024 18:32:11 +1000 Subject: [PATCH] fix options for machine list command --- cmd/uncloud/machine/list.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/uncloud/machine/list.go b/cmd/uncloud/machine/list.go index 2b2c5bf1..08a50111 100644 --- a/cmd/uncloud/machine/list.go +++ b/cmd/uncloud/machine/list.go @@ -6,18 +6,18 @@ import ( ) func NewListCommand() *cobra.Command { - opts := addOptions{} + var cluster string cmd := &cobra.Command{ Use: "list", Aliases: []string{"ls"}, Short: "List machines in a cluster", RunE: func(cmd *cobra.Command, args []string) error { uncli := cmd.Context().Value("cli").(*cli.CLI) - return uncli.ListMachines(cmd.Context(), opts.cluster) + return uncli.ListMachines(cmd.Context(), cluster) }, } cmd.Flags().StringVarP( - &opts.cluster, "cluster", "c", "", + &cluster, "cluster", "c", "", "Name of the cluster (default is the current cluster)", ) return cmd