-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add account
command
#15
Conversation
The `account` command displays information about the current user's account. Currently it displays the user's name, email, ID, account type, locale, referral link, paired status, and team info (if applicable).
Add an optional argument to the `account` command which allows it to look up other users by their account ID.
@waits what was your primary motivation for this command? As in, how are you using it in practice? |
@diwakergupta In order of potential usefulness (for myself, anyways, but hopefully for others as well):
|
w := new(tabwriter.Writer) | ||
w.Init(os.Stdout, 4, 8, 1, ' ', 0) | ||
|
||
switch len(args) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add the len validations for this as well, you could simplify this to
if len(args) == 0 {
...
} else {
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, that's cleaner. Added b75d1e3.
Validate the length of the `args` slice before accessing it. This allows the later switch statement to be simplified into an if/else block.
Thanks @waits ! |
The
account
command displays information about the current user's account.Currently it displays the user's name, email, ID, account type, locale,
referral link, paired status, and team info (if applicable).
It also takes an optional account ID to look up instead of the current user. In this case it displays slightly less info than when displaying the current account (due to API restrictions).
It also displays the team name and member ID if applicable. I don't have a business account to test with, though, so please double-check that it works.
Examples: