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

Function DomainsRemoveAutoComplete

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

Source from the content-addressed store, hash-verified

11)
12
13func DomainsRemoveAutoComplete(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 domains, err := client.DomainsList(ctx, appName)
24 if err != nil {
25 return errors.Wrapf(ctx, err, "fail to get domains list")
26 }
27
28 for _, domain := range domains {
29 fmt.Println(domain.Name)
30 }
31
32 return nil
33}

Callers 1

domains.goFile · 0.92

Calls 2

ScalingoClientFunction · 0.92
CurrentAppCompletionFunction · 0.85

Tested by

no test coverage detected