mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
fix: add missing root cmd flags
This commit is contained in:
parent
b2d9bd0312
commit
c72ef2b31c
|
@ -39,6 +39,9 @@ func init() {
|
|||
RootCmd.PersistentFlags().String("slack-channel", "dev-bbgo", "slack trading channel")
|
||||
RootCmd.PersistentFlags().String("slack-error-channel", "bbgo-error", "slack error channel")
|
||||
|
||||
RootCmd.PersistentFlags().String("telegram-bot-token", "", "telegram bot token from bot father")
|
||||
RootCmd.PersistentFlags().String("telegram-init-token", "", "telegram init token")
|
||||
|
||||
RootCmd.PersistentFlags().String("binance-api-key", "", "binance api key")
|
||||
RootCmd.PersistentFlags().String("binance-api-secret", "", "binance api secret")
|
||||
|
||||
|
@ -54,18 +57,18 @@ func Execute() {
|
|||
|
||||
// setup the config paths for looking up the config file
|
||||
/*
|
||||
viper.AddConfigPath("config")
|
||||
viper.AddConfigPath("$HOME/.bbgo")
|
||||
viper.AddConfigPath("/etc/bbgo")
|
||||
viper.AddConfigPath("config")
|
||||
viper.AddConfigPath("$HOME/.bbgo")
|
||||
viper.AddConfigPath("/etc/bbgo")
|
||||
|
||||
// set the config file name and format for loading the config file.
|
||||
viper.SetConfigName("bbgo")
|
||||
viper.SetConfigType("yaml")
|
||||
// set the config file name and format for loading the config file.
|
||||
viper.SetConfigName("bbgo")
|
||||
viper.SetConfigType("yaml")
|
||||
|
||||
err := viper.ReadInConfig()
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("failed to load config file")
|
||||
}
|
||||
err := viper.ReadInConfig()
|
||||
if err != nil {
|
||||
log.WithError(err).Fatal("failed to load config file")
|
||||
}
|
||||
*/
|
||||
|
||||
// Once the flags are defined, we can bind config keys with flags.
|
||||
|
|
Loading…
Reference in New Issue
Block a user