add service rm CLI command

This commit is contained in:
Pavel Sviderski
2024-12-05 17:32:30 +10:00
parent 1fb8a3d7a0
commit f85b5dd01d
7 changed files with 60 additions and 8 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ func NewListCommand() *cobra.Command {
Short: "List machines in a cluster.",
RunE: func(cmd *cobra.Command, args []string) error {
uncli := cmd.Context().Value("cli").(*cli.CLI)
return runList(cmd.Context(), uncli, cluster)
return list(cmd.Context(), uncli, cluster)
},
}
cmd.Flags().StringVarP(
@@ -31,7 +31,7 @@ func NewListCommand() *cobra.Command {
return cmd
}
func runList(ctx context.Context, uncli *cli.CLI, clusterName string) error {
func list(ctx context.Context, uncli *cli.CLI, clusterName string) error {
client, err := uncli.ConnectCluster(ctx, clusterName)
if err != nil {
return fmt.Errorf("connect to cluster: %w", err)