gctcli: bump urfave cli depends version (#698)

* gctcli: bump version

* gctcli: flag alias done differenttttttttttttt

* gctcli: add autocomplete scripts to folder within gctcli cmd folder structure
This commit is contained in:
Ryan O'Hara-Reid
2021-06-24 15:02:21 +10:00
committed by GitHub
parent d978b3bbdc
commit 79a47cf569
11 changed files with 422 additions and 362 deletions

View File

@@ -5,19 +5,19 @@ import (
"fmt"
"github.com/thrasher-corp/gocryptotrader/gctrpc"
"github.com/urfave/cli"
cli "github.com/urfave/cli/v2"
)
var websocketManagerCommand = cli.Command{
var websocketManagerCommand = &cli.Command{
Name: "websocket",
Usage: "execute websocket management command",
ArgsUsage: "<command> <args>",
Subcommands: []cli.Command{
Subcommands: []*cli.Command{
{
Name: "getinfo",
Usage: "returns all exchange websocket information",
Flags: []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "exchange",
Usage: "the exchange to act on",
},
@@ -28,7 +28,7 @@ var websocketManagerCommand = cli.Command{
Name: "disable",
Usage: "disables websocket connection for an exchange",
Flags: []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "exchange",
Usage: "the exchange to act on",
},
@@ -39,11 +39,11 @@ var websocketManagerCommand = cli.Command{
Name: "enable",
Usage: "enables websocket connection for an exchange",
Flags: []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "exchange",
Usage: "the exchange to act on",
},
cli.BoolTFlag{
&cli.BoolFlag{
Name: "enable",
Hidden: true,
},
@@ -54,7 +54,7 @@ var websocketManagerCommand = cli.Command{
Name: "getsubs",
Usage: "returns current subscriptions for an exchange",
Flags: []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "exchange",
Usage: "the exchange to act on",
},
@@ -65,11 +65,11 @@ var websocketManagerCommand = cli.Command{
Name: "setproxy",
Usage: "sets exchange websocket proxy, flushes and reroutes connection",
Flags: []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "exchange",
Usage: "the exchange to act on",
},
cli.StringFlag{
&cli.StringFlag{
Name: "proxy",
Usage: "proxy address to change to, if proxy string is not set, this will stop the utilization of the prior set proxy.",
},
@@ -80,11 +80,11 @@ var websocketManagerCommand = cli.Command{
Name: "seturl",
Usage: "sets exchange websocket endpoint URL and resets the websocket connection",
Flags: []cli.Flag{
cli.StringFlag{
&cli.StringFlag{
Name: "exchange",
Usage: "the exchange to act on",
},
cli.StringFlag{
&cli.StringFlag{
Name: "url",
Usage: "url string to change to, an empty string will set it back to the packaged defined default",
},
@@ -127,7 +127,7 @@ func getwebsocketInfo(c *cli.Context) error {
}
func enableDisableWebsocket(c *cli.Context) error {
enable := c.BoolT("enable")
enable := c.Bool("enable")
if c.NArg() == 0 && c.NumFlags() == 0 {
return cli.ShowSubcommandHelp(c)
}