mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
25 lines
479 B
Go
25 lines
479 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"github.com/sirupsen/logrus"
|
||
|
"github.com/spf13/cobra"
|
||
|
)
|
||
|
|
||
|
var subAccountsCmd = &cobra.Command{
|
||
|
Use: "subaccounts",
|
||
|
Short: "subaccounts",
|
||
|
|
||
|
// SilenceUsage is an option to silence usage when an error occurs.
|
||
|
SilenceUsage: true,
|
||
|
|
||
|
RunE: func(cmd *cobra.Command, args []string) error {
|
||
|
subAccounts, err := client.AccountService.QuerySubAccounts()
|
||
|
if err != nil {
|
||
|
return err
|
||
|
}
|
||
|
|
||
|
logrus.Infof("subAccounts: %+v", subAccounts)
|
||
|
return nil
|
||
|
},
|
||
|
}
|