Skip to content

Commit

Permalink
Changed whoami command output.
Browse files Browse the repository at this point in the history
  • Loading branch information
BogdanHabic committed Feb 10, 2019
1 parent c46536b commit 6026190
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions commands/whoami.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ var whoamiCmd = &cobra.Command{
Use: "whoami",
Short: "Who am I.",
Run: func(cmd *cobra.Command, args []string) {
CheckLogin()
rest := newRest()

user, err := rest.User.User()
Expand All @@ -25,7 +26,10 @@ var whoamiCmd = &cobra.Command{
os.Exit(0)
}

logrus.Infof("ID: %s", aurora.Magenta(user.ID))
logrus.Infof("Email: %s", aurora.Magenta(user.Email))
logrus.Infof("ID: %s", aurora.Green(user.ID))
logrus.Infof("Email: %s", aurora.Green(user.Email))
if len(user.Username) != 0 {
logrus.Infof("Username: %s", aurora.Green(user.Username))
}
},
}

0 comments on commit 6026190

Please sign in to comment.