(ctx context.Context)
| 9 | ) |
| 10 | |
| 11 | func 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 | } |
no test coverage detected