func NewController(appVersion string, configSchemaVersion string, configPath string, debug bool) (err error) {
	d := new(Controller)
	d.execPath = filepath.Dir(configPath)

	// initialize termui
	if err = ui.Init(); err != nil {
		panic(err)
	}
	defer ui.Close()

	d.viewManager, err = model.NewViewManager(&model.ConfigLoaderOption{
		ExecPath:            d.execPath,
		ConfigPath:          configPath,
		AppVersion:          appVersion,
		ConfigSchemaVersion: configSchemaVersion,
	})
	if err != nil {
		return
	}

	// layout first tab
	d.viewManager.SwitchTab(0)
	d.setKeyBindings()

	// init asynchronously
	if d.viewManager.HasWidget("github_issue") {
		go d.renderGitHubIssueWidgets()
	}

	if debug {
		return
	}
	ui.Loop()
	return
}
// NewController constructs a new Controller
NewController constructs a new Controller
// NewController constructs a new Controller
func NewController(appVersion string, configSchemaVersion string, configPath string, debug bool) (err error) {
	d := new(Controller)
	d.execPath = filepath.Dir(configPath)
	if err = ui.Init(); err != nil {
		panic(err)
	}
	defer ui.Close()
	d.viewManager, err = model.NewViewManager(&model.ConfigLoaderOption{
		ExecPath:            d.execPath,
		ConfigPath:          configPath,
		AppVersion:          appVersion,
		ConfigSchemaVersion: configSchemaVersion,
	})
	if err != nil {
		return
	}
	d.viewManager.SwitchTab(0)
	d.setKeyBindings()
	if d.viewManager.HasWidget("github_issue") {
		go d.renderGitHubIssueWidgets()
	}
	if debug {
		return
	}
	ui.Loop()
	return
}
func NewController ( appVersion string , configSchemaVersion string , configPath string , debug bool ) ( err error ) { d := new ( Controller ) d . execPath = filepath . Dir ( configPath ) if err = ui . Init ( ) ; err != nil { panic ( err ) } defer ui . Close ( ) d . viewManager , err = model . NewViewManager ( & model . ConfigLoaderOption { ExecPath : d . execPath , ConfigPath : configPath , AppVersion : appVersion , ConfigSchemaVersion : configSchemaVersion , } ) if err != nil { return } d . viewManager . SwitchTab ( 0 ) d . setKeyBindings ( ) if d . viewManager . HasWidget ( " " ) { go d . renderGitHubIssueWidgets ( ) } if debug { return } ui . Loop ( ) return }
NewController constructs a new Controller
NewController constructs a new Controller
// initialize termui // layout first tab // init asynchronously