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

Function AddonsRemoveAutoComplete

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

Source from the content-addressed store, hash-verified

11)
12
13func AddonsRemoveAutoComplete(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 resources, err := client.AddonsList(ctx, appName)
24 if err == nil {
25 for _, resource := range resources {
26 fmt.Println(resource.ResourceID)
27 }
28 }
29
30 return nil
31}

Callers 1

addons.goFile · 0.92

Calls 2

ScalingoClientFunction · 0.92
CurrentAppCompletionFunction · 0.85

Tested by

no test coverage detected