mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-07 23:16:53 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user