MCPcopy Create free account
hub / github.com/Scalingo/cli / ScaleAutoComplete

Function ScaleAutoComplete

cmd/autocomplete/scale.go:13–32  ·  view source on GitHub ↗
(ctx context.Context, c *cli.Command)

Source from the content-addressed store, hash-verified

11)
12
13func 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}

Callers 1

scale.goFile · 0.92

Calls 2

ScalingoClientFunction · 0.92
CurrentAppCompletionFunction · 0.85

Tested by

no test coverage detected