diff options
author | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 23:01:52 +0530 |
---|---|---|
committer | Vidhu Kant Sharma <vidhukant@vidhukant.xyz> | 2022-06-16 23:01:52 +0530 |
commit | c45cb6ebe10084d10f4fcf6189f26199f0913402 (patch) | |
tree | ecc39f3e2db66903ebea06b54edbd1423db7a09a /cmd/user_info.go | |
parent | 24ea0db80befd3bf5a67781084f48f0fa764d74f (diff) |
renamed Init to init function in mal because it should be called automatically
Diffstat (limited to 'cmd/user_info.go')
-rw-r--r-- | cmd/user_info.go | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/cmd/user_info.go b/cmd/user_info.go index 2da34aa..7c9387a 100644 --- a/cmd/user_info.go +++ b/cmd/user_info.go @@ -26,19 +26,22 @@ import ( var userInfoCmd = &cobra.Command { Use: "user-info", - Short: "prints authenticated user's info", - Long: ``, + Short: "Shows logged-in user's info", + Long: +`Print logged-in user's profile information. +Currently, MyAnimeList doesn't allow reading of other users' profiles +`, Run: func(cmd *cobra.Command, args []string) { userInfo := mal.GetUserInfo() - fmt.Printf("\x1b[1;34mUsername: \t%s\n\x1b[0m", userInfo.Name) - fmt.Printf("\x1b[1;34mProfile Picture: \t%s\n\x1b[0m", userInfo.Picture) - fmt.Printf("\x1b[1;34mGender: \t%s\n\x1b[0m", userInfo.Gender) - fmt.Printf("\x1b[1;34mLocation: \t%s\n\x1b[0m", userInfo.Location) - fmt.Printf("\x1b[1;34mBirthday: \t%s\n\x1b[0m", userInfo.Birthday) - fmt.Printf("\x1b[1;34mTime Zone: \t%s\n\x1b[0m", userInfo.TimeZone) - fmt.Printf("\x1b[1;34mJoined At: \t%s\n\x1b[0m", userInfo.JoinedAt) - fmt.Printf("\x1b[1;34mUser ID: \t%d\n\x1b[0m", userInfo.Id) + fmt.Printf("\x1b[1;34mUsername: %s\n\x1b[0m", userInfo.Name) + fmt.Printf("\x1b[1;34mProfile Picture: %s\n\x1b[0m", userInfo.Picture) + fmt.Printf("\x1b[1;34mGender: %s\n\x1b[0m", userInfo.Gender) + fmt.Printf("\x1b[1;34mLocation: %s\n\x1b[0m", userInfo.Location) + fmt.Printf("\x1b[1;34mBirthday: %s\n\x1b[0m", userInfo.Birthday) + fmt.Printf("\x1b[1;34mTime Zone: %s\n\x1b[0m", userInfo.TimeZone) + fmt.Printf("\x1b[1;34mJoined At: %s\n\x1b[0m", userInfo.JoinedAt) + fmt.Printf("\x1b[1;34mUser ID: %d\n\x1b[0m", userInfo.Id) if userInfo.IsSupporter { fmt.Printf("\x1b[33mYou are a MyAnimeList Supporter.\n\x1b[0m") |