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

Function Display

env/display.go:11–25  ·  view source on GitHub ↗
(ctx context.Context, app string)

Source from the content-addressed store, hash-verified

9)
10
11func Display(ctx context.Context, app string) error {
12 c, err := config.ScalingoClient(ctx)
13 if err != nil {
14 return errors.Wrapf(ctx, err, "fail to get Scalingo client")
15 }
16 vars, err := c.VariablesList(ctx, app)
17 if err != nil {
18 return errors.Wrapf(ctx, err, "fail to list the environment variables")
19 }
20
21 for _, v := range vars {
22 fmt.Printf("%s=%s\n", v.Name, v.Value)
23 }
24 return nil
25}
26
27func Get(ctx context.Context, appName, variableName string) (string, error) {
28 c, err := config.ScalingoClient(ctx)

Callers 1

env.goFile · 0.92

Calls 1

ScalingoClientFunction · 0.92

Tested by

no test coverage detected