cli: provide more explanations for node options

This commit is contained in:
Roman Khimov 2022-08-05 16:04:56 +03:00
parent 3e147a3fc9
commit 1367d0df00
2 changed files with 5 additions and 5 deletions

View file

@ -23,9 +23,9 @@ const RPCEndpointFlag = "rpc-endpoint"
// Network is a set of flags for choosing the network to operate on
// (privnet/mainnet/testnet).
var Network = []cli.Flag{
cli.BoolFlag{Name: "privnet, p"},
cli.BoolFlag{Name: "mainnet, m"},
cli.BoolFlag{Name: "testnet, t"},
cli.BoolFlag{Name: "privnet, p", Usage: "use private network configuration"},
cli.BoolFlag{Name: "mainnet, m", Usage: "use mainnet network configuration"},
cli.BoolFlag{Name: "testnet, t", Usage: "use testnet network configuration"},
cli.BoolFlag{Name: "unittest", Hidden: true},
}

View file

@ -43,12 +43,12 @@ var (
// NewCommands returns 'node' command.
func NewCommands() []cli.Command {
var cfgFlags = []cli.Flag{
cli.StringFlag{Name: "config-path"},
cli.StringFlag{Name: "config-path", Usage: "path to directory with configuration files"},
}
cfgFlags = append(cfgFlags, options.Network...)
var cfgWithCountFlags = make([]cli.Flag, len(cfgFlags))
copy(cfgWithCountFlags, cfgFlags)
cfgFlags = append(cfgFlags, cli.BoolFlag{Name: "debug, d"})
cfgFlags = append(cfgFlags, cli.BoolFlag{Name: "debug, d", Usage: "enable debug logging (LOTS of output)"})
cfgWithCountFlags = append(cfgWithCountFlags,
cli.UintFlag{