fix: remove requirements on config flag

This commit is contained in:
zenix 2022-03-11 19:56:59 +09:00
parent 522b84c6aa
commit 7e92f0f4e5
7 changed files with 0 additions and 13 deletions

View File

@ -24,9 +24,6 @@ var accountCmd = &cobra.Command{
Use: "account [--session SESSION]",
Short: "show user account details (ex: balance)",
SilenceUsage: true,
PreRunE: cobraInitRequired([]string{
"config",
}),
RunE: func(cmd *cobra.Command, args []string) error {
ctx := context.Background()

View File

@ -53,9 +53,6 @@ var BacktestCmd = &cobra.Command{
Use: "backtest",
Short: "backtest your strategies",
SilenceUsage: true,
PreRunE: cobraInitRequired([]string{
"config",
}),
RunE: func(cmd *cobra.Command, args []string) error {
verboseCnt, err := cmd.Flags().GetCount("verbose")
if err != nil {

View File

@ -34,7 +34,6 @@ var cancelOrderCmd = &cobra.Command{
// SilenceUsage is an option to silence usage when an error occurs.
SilenceUsage: true,
PreRunE: cobraInitRequired([]string{"config"}),
RunE: func(cmd *cobra.Command, args []string) error {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

View File

@ -19,7 +19,6 @@ var orderbookCmd = &cobra.Command{
Use: "orderbook --session=[exchange_name] --symbol=[pair_name]",
Short: "connect to the order book market data streaming service of an exchange",
PreRunE: cobraInitRequired([]string{
"config",
"session",
"symbol",
}),

View File

@ -24,7 +24,6 @@ var getOrderCmd = &cobra.Command{
Short: "Get order status",
SilenceUsage: true,
PreRunE: cobraInitRequired([]string{
"config",
"order-id",
"symbol",
}),

View File

@ -40,9 +40,6 @@ var RunCmd = &cobra.Command{
// SilenceUsage is an option to silence usage when an error occurs.
SilenceUsage: true,
PreRunE: cobraInitRequired([]string{
"config",
}),
RunE: run,
}

View File

@ -19,7 +19,6 @@ var userDataStreamCmd = &cobra.Command{
Use: "userdatastream",
Short: "Listen to session events (orderUpdate, tradeUpdate, balanceUpdate, balanceSnapshot)",
PreRunE: cobraInitRequired([]string{
"config",
"session",
}),
RunE: func(cmd *cobra.Command, args []string) error {