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

Function EnvUnsetAutoComplete

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

Source from the content-addressed store, hash-verified

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

Callers 1

env.goFile · 0.92

Calls 2

ScalingoClientFunction · 0.92
CurrentAppCompletionFunction · 0.85

Tested by

no test coverage detected