cli: fix description output using new version of urfave/cli/v2

This commit is contained in:
Scott
2022-12-23 11:49:07 +11:00
committed by GitHub
parent d739c66a8a
commit f307152cbf
7 changed files with 66 additions and 76 deletions

View File

@@ -125,7 +125,7 @@ var exchangePairManagerCommand = &cli.Command{
},
{
Name: "disableall",
Usage: "dissable all pairs",
Usage: "disable all pairs",
Flags: []cli.Flag{
&cli.StringFlag{
Name: "exchange",
@@ -162,11 +162,7 @@ var exchangePairManagerCommand = &cli.Command{
func enableDisableExchangePair(c *cli.Context) error {
enable := c.Bool("enable")
if c.NArg() == 0 && c.NumFlags() == 0 {
if enable {
return cli.ShowCommandHelp(c, "enable")
}
return cli.ShowCommandHelp(c, "disable")
return cli.ShowSubcommandHelp(c)
}
var exchange string
@@ -288,10 +284,7 @@ func getExchangePairs(c *cli.Context) error {
func enableDisableExchangeAsset(c *cli.Context) error {
enable := c.Bool("enable")
if c.NArg() == 0 && c.NumFlags() == 0 {
if enable {
return cli.ShowCommandHelp(c, "enableasset")
}
return cli.ShowCommandHelp(c, "disableasset")
return cli.ShowSubcommandHelp(c)
}
var exchange string
@@ -338,10 +331,7 @@ func enableDisableExchangeAsset(c *cli.Context) error {
func enableDisableAllExchangePairs(c *cli.Context) error {
enable := c.Bool("enable")
if c.NArg() == 0 && c.NumFlags() == 0 {
if enable {
return cli.ShowCommandHelp(c, "enableall")
}
return cli.ShowCommandHelp(c, "disableall")
return cli.ShowSubcommandHelp(c)
}
var exchange string