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