func (u *UserRepository) ByUsername(username string) (*User, error) {
	if user, ok := u.Users[username]; ok {
		return user, nil
	}
	return nil, ErrNotFound
}
func (u *UserRepository) ByUsername(username string) (*User, error) {
	if user, ok := u.Users[username]; ok {
		return user, nil
	}
	return nil, ErrNotFound
}
func ( u * UserRepository ) ByUsername ( username string ) ( * User , error ) { if user , ok := u . Users [ username ] ; ok { return user , nil } return nil , ErrNotFound }
// ByUsername finds a user by their username.
ByUsername finds a user by their username .