mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
rename enableApiServer to enableWebServer
This commit is contained in:
parent
0803d6bae0
commit
ea0c20cfe7
|
@ -331,7 +331,7 @@ func run(cmd *cobra.Command, args []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
enableApiServer, err := cmd.Flags().GetBool("enable-web-server")
|
enableWebServer, err := cmd.Flags().GetBool("enable-web-server")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -348,10 +348,7 @@ func run(cmd *cobra.Command, args []string) error {
|
||||||
|
|
||||||
var userConfig = &bbgo.Config{}
|
var userConfig = &bbgo.Config{}
|
||||||
|
|
||||||
if setup {
|
if !setup {
|
||||||
log.Infof("running in setup mode, skip reading config file")
|
|
||||||
enableApiServer = true
|
|
||||||
} else {
|
|
||||||
// if it's not setup, then the config file option is required.
|
// if it's not setup, then the config file option is required.
|
||||||
if len(configFile) == 0 {
|
if len(configFile) == 0 {
|
||||||
return errors.New("--config option is required")
|
return errors.New("--config option is required")
|
||||||
|
@ -377,7 +374,7 @@ func run(cmd *cobra.Command, args []string) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if setup {
|
if setup {
|
||||||
return runSetup(ctx, userConfig, enableApiServer)
|
return runSetup(ctx, userConfig, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
userConfig, err = bbgo.Load(configFile, true)
|
userConfig, err = bbgo.Load(configFile, true)
|
||||||
|
@ -385,7 +382,7 @@ func run(cmd *cobra.Command, args []string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
return runConfig(ctx, userConfig, enableApiServer)
|
return runConfig(ctx, userConfig, enableWebServer)
|
||||||
}
|
}
|
||||||
|
|
||||||
return runWrapperBinary(ctx, userConfig, cmd, args)
|
return runWrapperBinary(ctx, userConfig, cmd, args)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user