Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commands: fix verbose flag #5940

Merged
merged 2 commits into from
Jan 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/commands/active.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
verboseOptionName = "v"
verboseOptionName = "verbose"
)

var ActiveReqsCmd = &cmds.Command{
Expand All @@ -29,7 +29,7 @@ Lists running and recently run commands.
return cmds.EmitOnce(res, ctx.ReqLog.Report())
},
Options: []cmdkit.Option{
cmdkit.BoolOption("verbose", verboseOptionName, "Print extra information."),
cmdkit.BoolOption(verboseOptionName, "v", "Print extra information."),
},
Subcommands: map[string]*cmds.Command{
"clear": clearInactiveCmd,
Expand Down
14 changes: 7 additions & 7 deletions core/commands/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ var DhtCmd = &cmds.Command{
}

const (
dhtVerboseOptionName = "v"
dhtVerboseOptionName = "verbose"
)

var queryDhtCmd = &cmds.Command{
Expand All @@ -57,7 +57,7 @@ var queryDhtCmd = &cmds.Command{
cmdkit.StringArg("peerID", true, true, "The peerID to run the query against."),
},
Options: []cmdkit.Option{
cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."),
cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
Expand Down Expand Up @@ -132,7 +132,7 @@ var findProvidersDhtCmd = &cmds.Command{
cmdkit.StringArg("key", true, true, "The key to find providers for."),
},
Options: []cmdkit.Option{
cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."),
cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."),
cmdkit.IntOption(numProvidersOptionName, "n", "The number of providers to find.").WithDefault(20),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
Expand Down Expand Up @@ -226,7 +226,7 @@ var provideRefDhtCmd = &cmds.Command{
cmdkit.StringArg("key", true, true, "The key[s] to send provide records for.").EnableStdin(),
},
Options: []cmdkit.Option{
cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."),
cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."),
cmdkit.BoolOption(recursiveOptionName, "r", "Recursively provide entire graph."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
Expand Down Expand Up @@ -356,7 +356,7 @@ var findPeerDhtCmd = &cmds.Command{
cmdkit.StringArg("peerID", true, true, "The ID of the peer to search for."),
},
Options: []cmdkit.Option{
cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."),
cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
Expand Down Expand Up @@ -438,7 +438,7 @@ Different key types can specify other 'best' rules.
cmdkit.StringArg("key", true, true, "The key to find a value for."),
},
Options: []cmdkit.Option{
cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."),
cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
Expand Down Expand Up @@ -530,7 +530,7 @@ NOTE: A value may not exceed 2048 bytes.
cmdkit.StringArg("value", true, false, "The value to store.").EnableStdin(),
},
Options: []cmdkit.Option{
cmdkit.BoolOption("verbose", dhtVerboseOptionName, "Print extra information."),
cmdkit.BoolOption(dhtVerboseOptionName, "v", "Print extra information."),
},
Run: func(req *cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
nd, err := cmdenv.GetNode(env)
Expand Down