func (a *AuthService) InitClient() (client *go_github.Client, err error) {

	if err = a.loadConfig(); err != nil {
		return
	}

	if a.oauthToken == "" {
		if err = a.authorizeClient(a.host); err != nil {
			return
		}
	}

	if err = a.login(); err != nil {
		if err = a.authorizeClient(a.host); err != nil {
			return
		}
	}
	client = a.client

	return
}
// InitClient initializes an AuthService instance
// by loading ~/.config/mcc or basic authentication
InitClient initializes an AuthService instance
by loading ~/.config/mcc or basic authentication
// InitClient initializes an AuthService instance // by loading ~ / . config / mcc or basic authentication
func (a *AuthService) InitClient() (client *go_github.Client, err error) {
	if err = a.loadConfig(); err != nil {
		return
	}
	if a.oauthToken == "" {
		if err = a.authorizeClient(a.host); err != nil {
			return
		}
	}
	if err = a.login(); err != nil {
		if err = a.authorizeClient(a.host); err != nil {
			return
		}
	}
	client = a.client
	return
}
func ( a * AuthService ) InitClient ( ) ( client * go_github . Client , err error ) { if err = a . loadConfig ( ) ; err != nil { return } if a . oauthToken == " " { if err = a . authorizeClient ( a . host ) ; err != nil { return } } if err = a . login ( ) ; err != nil { if err = a . authorizeClient ( a . host ) ; err != nil { return } } client = a . client return }
InitClient initializes an AuthService instance
by loading ~/.config/mcc or basic authentication
InitClient initializes an AuthService instance by loading ~ / . config / mcc or basic authentication