mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-27 11:33:33 +00:00
add ListServices method and ls CLI command
This commit is contained in:
@@ -32,13 +32,13 @@ func NewListCommand() *cobra.Command {
|
||||
}
|
||||
|
||||
func runList(ctx context.Context, uncli *cli.CLI, clusterName string) error {
|
||||
c, err := uncli.ConnectCluster(ctx, clusterName)
|
||||
client, err := uncli.ConnectCluster(ctx, clusterName)
|
||||
if err != nil {
|
||||
return fmt.Errorf("connect to cluster: %w", err)
|
||||
}
|
||||
defer c.Close()
|
||||
defer client.Close()
|
||||
|
||||
machines, err := c.ListMachines(ctx)
|
||||
machines, err := client.ListMachines(ctx)
|
||||
if err != nil {
|
||||
return fmt.Errorf("list machines: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user