cli: move debug flag to options package
This commit is contained in:
parent
37571162a0
commit
5698ce03be
2 changed files with 7 additions and 1 deletions
|
@ -59,6 +59,12 @@ var Config = cli.StringFlag{
|
||||||
Usage: "path to directory with configuration files",
|
Usage: "path to directory with configuration files",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Debug is a flag for commands that allow node in debug mode usage.
|
||||||
|
var Debug = cli.BoolFlag{
|
||||||
|
Name: "debug, d",
|
||||||
|
Usage: "enable debug logging (LOTS of output)",
|
||||||
|
}
|
||||||
|
|
||||||
var errNoEndpoint = errors.New("no RPC endpoint specified, use option '--" + RPCEndpointFlag + "' or '-r'")
|
var errNoEndpoint = errors.New("no RPC endpoint specified, use option '--" + RPCEndpointFlag + "' or '-r'")
|
||||||
var errInvalidHistoric = errors.New("invalid 'historic' parameter, neither a block number, nor a block/state hash")
|
var errInvalidHistoric = errors.New("invalid 'historic' parameter, neither a block number, nor a block/state hash")
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ func NewCommands() []cli.Command {
|
||||||
cfgFlags = append(cfgFlags, options.Network...)
|
cfgFlags = append(cfgFlags, options.Network...)
|
||||||
var cfgWithCountFlags = make([]cli.Flag, len(cfgFlags))
|
var cfgWithCountFlags = make([]cli.Flag, len(cfgFlags))
|
||||||
copy(cfgWithCountFlags, cfgFlags)
|
copy(cfgWithCountFlags, cfgFlags)
|
||||||
cfgFlags = append(cfgFlags, cli.BoolFlag{Name: "debug, d", Usage: "enable debug logging (LOTS of output)"})
|
cfgFlags = append(cfgFlags, options.Debug)
|
||||||
|
|
||||||
cfgWithCountFlags = append(cfgWithCountFlags,
|
cfgWithCountFlags = append(cfgWithCountFlags,
|
||||||
cli.UintFlag{
|
cli.UintFlag{
|
||||||
|
|
Loading…
Reference in a new issue