mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-02-03 22:18:39 +00:00
cmd: refactoring Run function
So it's easier, more clear, more isolation between code on non-mobile and mobile platforms.
This commit is contained in:
committed by
Cuong Manh Le
parent
507c1afd59
commit
bed7435b0c
@@ -31,7 +31,6 @@ type AppCallback interface {
|
||||
func (c *Controller) Start(CdUID string, HomeDir string, logLevel int, logPath string) {
|
||||
if c.stopCh == nil {
|
||||
c.stopCh = make(chan struct{})
|
||||
cli.InitConsoleLogging()
|
||||
c.Config = cli.AppConfig{
|
||||
CdUID: CdUID,
|
||||
HomeDir: HomeDir,
|
||||
@@ -39,7 +38,7 @@ func (c *Controller) Start(CdUID string, HomeDir string, logLevel int, logPath s
|
||||
LogPath: logPath,
|
||||
}
|
||||
appCallback := mapCallback(c.AppCallback)
|
||||
cli.Run(nil, &c.Config, &appCallback, c.stopCh)
|
||||
cli.RunMobile(&c.Config, &appCallback, c.stopCh)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user