// Init initializes a gitlab client for use throughout lab.
Init initializes a gitlab client for use throughout lab.
// Init initializes a gitlab client for use throughout lab .
func Init(_host, _user, _token string) {
	initLogger()
	InitCache()
	cmdLogger.Debugf("initializing")
	defaultPrinter.DisableColor()
	if len(_host) > 0 && _host[len(_host)-1:][0] == '/' {
		_host = _host[0 : len(_host)-1]
	}
	host = _host
	user = _user
	token = _token
	lab = gitlab.NewClient(gitlabHttpClient(), token)
	if lab.BaseURL().String() != (_host + "/api/v4/") {
		cmdLogger.Debugf("Changing BaseURL from %s to %s", lab.BaseURL().String(), _host)
		lab.SetBaseURL(host + "/api/v4")
	}
	graphqlClient = graphql.NewClient(host+"/api/graphql", withToken())
	viper.SetDefault("edit.filetype", "markdown")
}
func Init ( _host , _user , _token string ) { initLogger ( ) InitCache ( ) cmdLogger . Debugf ( " " ) defaultPrinter . DisableColor ( ) if len ( _host ) > 0 && _host [ len ( _host ) - 1 : ] [ 0 ] == '/' { _host = _host [ 0 : len ( _host ) - 1 ] } host = _host user = _user token = _token lab = gitlab . NewClient ( gitlabHttpClient ( ) , token ) if lab . BaseURL ( ) . String ( ) != ( _host + " " ) { cmdLogger . Debugf ( " " , lab . BaseURL ( ) . String ( ) , _host ) lab . SetBaseURL ( host + " " ) } graphqlClient = graphql . NewClient ( host + " " , withToken ( ) ) viper . SetDefault ( " " , " " ) }
Init initializes a gitlab client for use throughout lab.
Init initializes a gitlab client for use throughout lab .