aboutsummaryrefslogtreecommitdiff
path: root/mal/user.go
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-29 23:46:53 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.xyz>2022-06-29 23:46:53 +0530
commit1395d849470cc564d593bd2074a69f012e4f70ce (patch)
treec14d064e86122add55340051f98c145b882d4878 /mal/user.go
parentccb1cf8c1679d5e8a401a85151ef9882e4293b81 (diff)
migrated from MAL2Go v1 to v2
Diffstat (limited to 'mal/user.go')
-rw-r--r--mal/user.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/mal/user.go b/mal/user.go
index 4d7aa45..f6e9ce7 100644
--- a/mal/user.go
+++ b/mal/user.go
@@ -19,9 +19,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package mal
import (
- u "github.com/MikunoNaka/MAL2Go/user"
+ u "github.com/MikunoNaka/MAL2Go/v2/user"
+ "fmt"
+ "os"
)
func GetUserInfo() u.UserInfo {
- return userClient.GetSelfUserInfo()
+ userInfo, err := userClient.GetSelfUserInfo()
+ if err != nil {
+ fmt.Println("Error fetching User Information:", err)
+ os.Exit(1)
+ }
+ return userInfo
}