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

Function Self

user/self.go:11–23  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

9)
10
11func Self(ctx context.Context) error {
12 c, err := config.ScalingoAuthClient(ctx)
13 if err != nil {
14 return errors.Wrapf(ctx, err, "fail to get scalingo API client")
15 }
16 user, err := c.Self(ctx)
17 if err != nil {
18 return errors.Wrapf(ctx, err, "fail to get user info")
19 }
20
21 io.Statusf("You are logged in as %s (%s)\n", user.Username, user.Email)
22 return nil
23}

Callers 1

self.goFile · 0.92

Calls 2

ScalingoAuthClientFunction · 0.92
StatusfFunction · 0.92

Tested by

no test coverage detected