5.1. InitUser: Create a user account.¶
Implement this function:
InitUser(username string, password string) (userdataptr *User, err error)¶
Creates a User struct, initializes all necessary data within the struct and returns a pointer to it.
The User struct should include all data the client needs to operate on behalf of this user.
If a user with the same username already exists, return an error.
username (string) – Username
password (string) – Password
- Return type