(ctx context.Context, c *cli.Command)
| 11 | ) |
| 12 | |
| 13 | func ScaleAutoComplete(ctx context.Context, c *cli.Command) error { |
| 14 | appName := CurrentAppCompletion(ctx, c) |
| 15 | if appName == "" { |
| 16 | return nil |
| 17 | } |
| 18 | |
| 19 | client, err := config.ScalingoClient(ctx) |
| 20 | if err != nil { |
| 21 | return errors.Wrapf(ctx, err, "fail to get Scalingo client") |
| 22 | } |
| 23 | processes, err := client.AppsContainerTypes(ctx, appName) |
| 24 | if err != nil { |
| 25 | return errors.Wrapf(ctx, err, "list container types for app %s", appName) |
| 26 | } |
| 27 | for _, ct := range processes { |
| 28 | fmt.Printf("%s:%d:%s\n", ct.Name, ct.Amount, ct.Size) |
| 29 | } |
| 30 | |
| 31 | return nil |
| 32 | } |
no test coverage detected