From 57f544a79cdd8b4f6a0c1f4bce1c750985708b22 Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Thu, 6 Jul 2017 10:57:49 +0200 Subject: [PATCH] remove all instances of `Default(false)` Boolean options always default to false. License: MIT Signed-off-by: Lorenzo Manacorda --- cmd/ipfs/daemon.go | 14 +++++++------- cmd/ipfs/init.go | 2 +- core/commands/active.go | 2 +- core/commands/block.go | 4 ++-- core/commands/commands.go | 2 +- core/commands/config.go | 4 ++-- core/commands/dag/dag.go | 2 +- core/commands/dht.go | 14 +++++++------- core/commands/dns.go | 2 +- core/commands/files/files.go | 4 ++-- core/commands/get.go | 4 ++-- core/commands/ipns.go | 4 ++-- core/commands/ls.go | 2 +- core/commands/object/object.go | 4 ++-- core/commands/object/patch.go | 2 +- core/commands/p2p.go | 8 ++++---- core/commands/pin.go | 2 +- core/commands/refs.go | 6 +++--- core/commands/repo.go | 6 +++--- core/commands/resolve.go | 2 +- core/commands/root.go | 8 ++++---- core/commands/stat.go | 2 +- core/commands/swarm.go | 2 +- core/commands/version.go | 8 ++++---- 24 files changed, 55 insertions(+), 55 deletions(-) diff --git a/cmd/ipfs/daemon.go b/cmd/ipfs/daemon.go index 519a69bd4..76e5f0e23 100644 --- a/cmd/ipfs/daemon.go +++ b/cmd/ipfs/daemon.go @@ -144,17 +144,17 @@ Headers. }, Options: []cmdkit.Option{ - cmdkit.BoolOption(initOptionKwd, "Initialize ipfs with default settings if not already initialized").Default(false), + cmdkit.BoolOption(initOptionKwd, "Initialize ipfs with default settings if not already initialized"), cmdkit.StringOption(routingOptionKwd, "Overrides the routing option").Default("dht"), - cmdkit.BoolOption(mountKwd, "Mounts IPFS to the filesystem").Default(false), - cmdkit.BoolOption(writableKwd, "Enable writing objects (with POST, PUT and DELETE)").Default(false), + cmdkit.BoolOption(mountKwd, "Mounts IPFS to the filesystem"), + cmdkit.BoolOption(writableKwd, "Enable writing objects (with POST, PUT and DELETE)"), cmdkit.StringOption(ipfsMountKwd, "Path to the mountpoint for IPFS (if using --mount). Defaults to config setting."), cmdkit.StringOption(ipnsMountKwd, "Path to the mountpoint for IPNS (if using --mount). Defaults to config setting."), - cmdkit.BoolOption(unrestrictedApiAccessKwd, "Allow API access to unlisted hashes").Default(false), - cmdkit.BoolOption(unencryptTransportKwd, "Disable transport encryption (for debugging protocols)").Default(false), - cmdkit.BoolOption(enableGCKwd, "Enable automatic periodic repo garbage collection").Default(false), + cmdkit.BoolOption(unrestrictedApiAccessKwd, "Allow API access to unlisted hashes"), + cmdkit.BoolOption(unencryptTransportKwd, "Disable transport encryption (for debugging protocols)"), + cmdkit.BoolOption(enableGCKwd, "Enable automatic periodic repo garbage collection"), cmdkit.BoolOption(adjustFDLimitKwd, "Check and raise file descriptor limits if needed").Default(true), - cmdkit.BoolOption(offlineKwd, "Run offline. Do not connect to the rest of the network but provide local API.").Default(false), + cmdkit.BoolOption(offlineKwd, "Run offline. Do not connect to the rest of the network but provide local API."), cmdkit.BoolOption(migrateKwd, "If true, assume yes at the migrate prompt. If false, assume no."), cmdkit.BoolOption(enableFloodSubKwd, "Instantiate the ipfs daemon with the experimental pubsub feature enabled."), cmdkit.BoolOption(enableMultiplexKwd, "Add the experimental 'go-multiplex' stream muxer to libp2p on construction.").Default(true), diff --git a/cmd/ipfs/init.go b/cmd/ipfs/init.go index 991fa636f..4178af0e4 100644 --- a/cmd/ipfs/init.go +++ b/cmd/ipfs/init.go @@ -51,7 +51,7 @@ environment variable: }, Options: []cmdkit.Option{ cmdkit.IntOption("bits", "b", "Number of bits to use in the generated RSA private key.").Default(nBitsForKeypairDefault), - cmdkit.BoolOption("empty-repo", "e", "Don't add and pin help files to the local storage.").Default(false), + cmdkit.BoolOption("empty-repo", "e", "Don't add and pin help files to the local storage."), cmdkit.StringOption("profile", "p", "Apply profile settings to config. Multiple profiles can be separated by ','"), // TODO need to decide whether to expose the override as a file or a diff --git a/core/commands/active.go b/core/commands/active.go index 95ff428c1..7c0724d1c 100644 --- a/core/commands/active.go +++ b/core/commands/active.go @@ -25,7 +25,7 @@ Lists running and recently run commands. res.SetOutput(req.InvocContext().ReqLog.Report()) }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", "v", "Print extra information.").Default(false), + cmdkit.BoolOption("verbose", "v", "Print extra information."), }, Subcommands: map[string]*cmds.Command{ "clear": clearInactiveCmd, diff --git a/core/commands/block.go b/core/commands/block.go index 09a595ec7..cf41613aa 100644 --- a/core/commands/block.go +++ b/core/commands/block.go @@ -260,8 +260,8 @@ It takes a list of base58 encoded multihashs to remove. cmdkit.StringArg("hash", true, true, "Bash58 encoded multihash of block(s) to remove."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("force", "f", "Ignore nonexistent blocks.").Default(false), - cmdkit.BoolOption("quiet", "q", "Write minimal output.").Default(false), + cmdkit.BoolOption("force", "f", "Ignore nonexistent blocks."), + cmdkit.BoolOption("quiet", "q", "Write minimal output."), }, Run: func(req cmds.Request, res cmds.ResponseEmitter) { n, err := req.InvocContext().GetNode() diff --git a/core/commands/commands.go b/core/commands/commands.go index 49ee4cff1..5044b175d 100644 --- a/core/commands/commands.go +++ b/core/commands/commands.go @@ -67,7 +67,7 @@ func CommandsCmd(root *cmds.Command) *cmds.Command { ShortDescription: `Lists all available commands (and subcommands) and exits.`, }, Options: []cmdkit.Option{ - cmdkit.BoolOption(flagsOptionName, "f", "Show command flags").Default(false), + cmdkit.BoolOption(flagsOptionName, "f", "Show command flags"), }, Run: func(req cmds.Request, res cmds.ResponseEmitter) { rootCmd := cmd2outputCmd("ipfs", root) diff --git a/core/commands/config.go b/core/commands/config.go index 6c91ba24a..890752801 100644 --- a/core/commands/config.go +++ b/core/commands/config.go @@ -54,8 +54,8 @@ Set the value of the 'Datastore.Path' key: cmdkit.StringArg("value", false, false, "The value to set the config entry to."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("bool", "Set a boolean value.").Default(false), - cmdkit.BoolOption("json", "Parse stringified JSON.").Default(false), + cmdkit.BoolOption("bool", "Set a boolean value."), + cmdkit.BoolOption("json", "Parse stringified JSON."), }, Run: func(req cmds.Request, res cmds.Response) { args := req.Arguments() diff --git a/core/commands/dag/dag.go b/core/commands/dag/dag.go index 7fc0a2cbd..f01125210 100644 --- a/core/commands/dag/dag.go +++ b/core/commands/dag/dag.go @@ -61,7 +61,7 @@ into an object of the specified format. Options: []cmdkit.Option{ cmdkit.StringOption("format", "f", "Format that the object will be added as.").Default("cbor"), cmdkit.StringOption("input-enc", "Format that the input object will be.").Default("json"), - cmdkit.BoolOption("pin", "Pin this object when adding.").Default(false), + cmdkit.BoolOption("pin", "Pin this object when adding."), cmdkit.StringOption("hash", "Hash function to use").Default(""), }, Run: func(req cmds.Request, res cmds.Response) { diff --git a/core/commands/dht.go b/core/commands/dht.go index b6000e406..f76113f6a 100644 --- a/core/commands/dht.go +++ b/core/commands/dht.go @@ -51,7 +51,7 @@ var queryDhtCmd = &cmds.Command{ cmdkit.StringArg("peerID", true, true, "The peerID to run the query against."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", "v", "Print extra information.").Default(false), + cmdkit.BoolOption("verbose", "v", "Print extra information."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() @@ -139,7 +139,7 @@ var findProvidersDhtCmd = &cmds.Command{ cmdkit.StringArg("key", true, true, "The key to find providers for."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", "v", "Print extra information.").Default(false), + cmdkit.BoolOption("verbose", "v", "Print extra information."), cmdkit.IntOption("num-providers", "n", "The number of providers to find.").Default(20), }, Run: func(req cmds.Request, res cmds.Response) { @@ -248,8 +248,8 @@ var provideRefDhtCmd = &cmds.Command{ cmdkit.StringArg("key", true, true, "The key[s] to send provide records for.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", "v", "Print extra information.").Default(false), - cmdkit.BoolOption("recursive", "r", "Recursively provide entire graph.").Default(false), + cmdkit.BoolOption("verbose", "v", "Print extra information."), + cmdkit.BoolOption("recursive", "r", "Recursively provide entire graph."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() @@ -397,7 +397,7 @@ var findPeerDhtCmd = &cmds.Command{ cmdkit.StringArg("peerID", true, true, "The ID of the peer to search for."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("verbose", "v", "Print extra information.").Default(false), + cmdkit.BoolOption("verbose", "v", "Print extra information."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() @@ -499,7 +499,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", "v", "Print extra information.").Default(false), + cmdkit.BoolOption("verbose", "v", "Print extra information."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() @@ -611,7 +611,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", "v", "Print extra information.").Default(false), + cmdkit.BoolOption("verbose", "v", "Print extra information."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() diff --git a/core/commands/dns.go b/core/commands/dns.go index c02c6f9c4..0bc90799e 100644 --- a/core/commands/dns.go +++ b/core/commands/dns.go @@ -49,7 +49,7 @@ The resolver can recursively resolve: cmdkit.StringArg("domain-name", true, false, "The domain-name name to resolve.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("recursive", "r", "Resolve until the result is not a DNS link.").Default(false), + cmdkit.BoolOption("recursive", "r", "Resolve until the result is not a DNS link."), }, Run: func(req cmds.Request, res cmds.Response) { diff --git a/core/commands/files/files.go b/core/commands/files/files.go index 5a3c10ad5..c112c845b 100644 --- a/core/commands/files/files.go +++ b/core/commands/files/files.go @@ -83,8 +83,8 @@ Size: CumulativeSize: ChildBlocks: Type: `), - cmdkit.BoolOption("hash", "Print only hash. Implies '--format='. Conflicts with other format options.").Default(false), - cmdkit.BoolOption("size", "Print only size. Implies '--format='. Conflicts with other format options.").Default(false), + cmdkit.BoolOption("hash", "Print only hash. Implies '--format='. Conflicts with other format options."), + cmdkit.BoolOption("size", "Print only size. Implies '--format='. Conflicts with other format options."), }, Run: func(req cmds.Request, res cmds.Response) { diff --git a/core/commands/get.go b/core/commands/get.go index 1fef99f64..2f06549ca 100644 --- a/core/commands/get.go +++ b/core/commands/get.go @@ -44,8 +44,8 @@ may also specify the level of compression by specifying '-l=<1-9>'. }, Options: []cmdkit.Option{ cmdkit.StringOption("output", "o", "The path where the output should be stored."), - cmdkit.BoolOption("archive", "a", "Output a TAR archive.").Default(false), - cmdkit.BoolOption("compress", "C", "Compress the output with GZIP compression.").Default(false), + cmdkit.BoolOption("archive", "a", "Output a TAR archive."), + cmdkit.BoolOption("compress", "C", "Compress the output with GZIP compression."), cmdkit.IntOption("compression-level", "l", "The level of compression (1-9).").Default(-1), }, PreRun: func(req cmds.Request) error { diff --git a/core/commands/ipns.go b/core/commands/ipns.go index ce849b324..37ca69fad 100644 --- a/core/commands/ipns.go +++ b/core/commands/ipns.go @@ -55,8 +55,8 @@ Resolve the value of a dnslink: cmdkit.StringArg("name", false, false, "The IPNS name to resolve. Defaults to your node's peerID."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("recursive", "r", "Resolve until the result is not an IPNS name.").Default(false), - cmdkit.BoolOption("nocache", "n", "Do not use cached entries.").Default(false), + cmdkit.BoolOption("recursive", "r", "Resolve until the result is not an IPNS name."), + cmdkit.BoolOption("nocache", "n", "Do not use cached entries."), }, Run: func(req cmds.Request, res cmds.Response) { diff --git a/core/commands/ls.go b/core/commands/ls.go index 91ad63222..d20c65ec1 100644 --- a/core/commands/ls.go +++ b/core/commands/ls.go @@ -53,7 +53,7 @@ The JSON output contains type information. cmdkit.StringArg("ipfs-path", true, true, "The path to the IPFS object(s) to list links from.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("headers", "v", "Print table headers (Hash, Size, Name).").Default(false), + cmdkit.BoolOption("headers", "v", "Print table headers (Hash, Size, Name)."), cmdkit.BoolOption("resolve-type", "Resolve linked objects to find out their types.").Default(true), }, Run: func(req cmds.Request, res cmds.Response) { diff --git a/core/commands/object/object.go b/core/commands/object/object.go index 5c902aa29..38d08f672 100644 --- a/core/commands/object/object.go +++ b/core/commands/object/object.go @@ -127,7 +127,7 @@ multihash. cmdkit.StringArg("key", true, false, "Key of the object to retrieve, in base58-encoded multihash format.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("headers", "v", "Print table headers (Hash, Size, Name).").Default(false), + cmdkit.BoolOption("headers", "v", "Print table headers (Hash, Size, Name)."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() @@ -384,7 +384,7 @@ And then run: Options: []cmdkit.Option{ cmdkit.StringOption("inputenc", "Encoding type of input data. One of: {\"protobuf\", \"json\"}.").Default("json"), cmdkit.StringOption("datafieldenc", "Encoding type of the data field, either \"text\" or \"base64\".").Default("text"), - cmdkit.BoolOption("pin", "Pin this object when adding.").Default(false), + cmdkit.BoolOption("pin", "Pin this object when adding."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() diff --git a/core/commands/object/patch.go b/core/commands/object/patch.go index a2c09c83b..eb9407d32 100644 --- a/core/commands/object/patch.go +++ b/core/commands/object/patch.go @@ -272,7 +272,7 @@ to a file containing 'bar', and returns the hash of the new object. cmdkit.StringArg("ref", true, false, "IPFS object to add link to."), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("create", "p", "Create intermediary nodes.").Default(false), + cmdkit.BoolOption("create", "p", "Create intermediary nodes."), }, Run: func(req cmds.Request, res cmds.Response) { nd, err := req.InvocContext().GetNode() diff --git a/core/commands/p2p.go b/core/commands/p2p.go index a6c84950f..198ba0d2a 100644 --- a/core/commands/p2p.go +++ b/core/commands/p2p.go @@ -91,7 +91,7 @@ var p2pListenerLsCmd = &cmds.Command{ Tagline: "List active p2p listeners.", }, Options: []cmdkit.Option{ - cmdkit.BoolOption("headers", "v", "Print table headers (HandlerID, Protocol, Local, Remote).").Default(false), + cmdkit.BoolOption("headers", "v", "Print table headers (HandlerID, Protocol, Local, Remote)."), }, Run: func(req cmds.Request, res cmds.Response) { @@ -143,7 +143,7 @@ var p2pStreamLsCmd = &cmds.Command{ Tagline: "List active p2p streams.", }, Options: []cmdkit.Option{ - cmdkit.BoolOption("headers", "v", "Print table headers (HagndlerID, Protocol, Local, Remote).").Default(false), + cmdkit.BoolOption("headers", "v", "Print table headers (HagndlerID, Protocol, Local, Remote)."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := getNode(req) @@ -307,7 +307,7 @@ var p2pListenerCloseCmd = &cmds.Command{ cmdkit.StringArg("Protocol", false, false, "P2P listener protocol"), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("all", "a", "Close all listeners.").Default(false), + cmdkit.BoolOption("all", "a", "Close all listeners."), }, Run: func(req cmds.Request, res cmds.Response) { res.SetOutput(nil) @@ -350,7 +350,7 @@ var p2pStreamCloseCmd = &cmds.Command{ cmdkit.StringArg("HandlerID", false, false, "Stream HandlerID"), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("all", "a", "Close all streams.").Default(false), + cmdkit.BoolOption("all", "a", "Close all streams."), }, Run: func(req cmds.Request, res cmds.Response) { res.SetOutput(nil) diff --git a/core/commands/pin.go b/core/commands/pin.go index 8b23ad6bb..d8b8e5e59 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -276,7 +276,7 @@ Example: }, Options: []cmdkit.Option{ cmdkit.StringOption("type", "t", "The type of pinned keys to list. Can be \"direct\", \"indirect\", \"recursive\", or \"all\".").Default("all"), - cmdkit.BoolOption("quiet", "q", "Write just hashes of objects.").Default(false), + cmdkit.BoolOption("quiet", "q", "Write just hashes of objects."), }, Run: func(req cmds.Request, res cmds.Response) { n, err := req.InvocContext().GetNode() diff --git a/core/commands/refs.go b/core/commands/refs.go index 066e4249f..0b1293d40 100644 --- a/core/commands/refs.go +++ b/core/commands/refs.go @@ -62,9 +62,9 @@ NOTE: List all references recursively by using the flag '-r'. }, Options: []cmdkit.Option{ cmdkit.StringOption("format", "Emit edges with given format. Available tokens: .").Default(""), - cmdkit.BoolOption("edges", "e", "Emit edge format: ` -> `.").Default(false), - cmdkit.BoolOption("unique", "u", "Omit duplicate refs from output.").Default(false), - cmdkit.BoolOption("recursive", "r", "Recursively list links of child nodes.").Default(false), + cmdkit.BoolOption("edges", "e", "Emit edge format: ` -> `."), + cmdkit.BoolOption("unique", "u", "Omit duplicate refs from output."), + cmdkit.BoolOption("recursive", "r", "Recursively list links of child nodes."), }, Run: func(req cmds.Request, res cmds.Response) { ctx := req.Context() diff --git a/core/commands/repo.go b/core/commands/repo.go index d8de28e95..ff67410f9 100644 --- a/core/commands/repo.go +++ b/core/commands/repo.go @@ -61,8 +61,8 @@ order to reclaim hard disk space. `, }, Options: []cmdkit.Option{ - cmdkit.BoolOption("stream-errors", "Stream errors.").Default(false), - cmdkit.BoolOption("quiet", "q", "Write minimal output.").Default(false), + cmdkit.BoolOption("stream-errors", "Stream errors."), + cmdkit.BoolOption("quiet", "q", "Write minimal output."), }, Run: func(req oldcmds.Request, res oldcmds.Response) { n, err := req.InvocContext().GetNode() @@ -165,7 +165,7 @@ Version string The repo version. cmds.EmitOnce(res, stat) }, Options: []cmdkit.Option{ - cmdkit.BoolOption("human", "Output RepoSize in MiB.").Default(false), + cmdkit.BoolOption("human", "Output RepoSize in MiB."), }, Type: corerepo.Stat{}, Encoders: cmds.EncoderMap{ diff --git a/core/commands/resolve.go b/core/commands/resolve.go index d667cc633..63d6b93fd 100644 --- a/core/commands/resolve.go +++ b/core/commands/resolve.go @@ -61,7 +61,7 @@ Resolve the value of an IPFS DAG path: cmdkit.StringArg("name", true, false, "The name to resolve.").EnableStdin(), }, Options: []cmdkit.Option{ - cmdkit.BoolOption("recursive", "r", "Resolve until the result is an IPFS name.").Default(false), + cmdkit.BoolOption("recursive", "r", "Resolve until the result is an IPFS name."), }, Run: func(req cmds.Request, res cmds.Response) { diff --git a/core/commands/root.go b/core/commands/root.go index e3de7c99d..9c77286ce 100644 --- a/core/commands/root.go +++ b/core/commands/root.go @@ -86,10 +86,10 @@ The CLI will exit with one of the following values: }, Options: []cmdkit.Option{ cmdkit.StringOption("config", "c", "Path to the configuration file to use."), - cmdkit.BoolOption("debug", "D", "Operate in debug mode.").Default(false), - cmdkit.BoolOption("help", "Show the full command help text.").Default(false), - cmdkit.BoolOption("h", "Show a short version of the command help text.").Default(false), - cmdkit.BoolOption("local", "L", "Run the command locally, instead of using the daemon.").Default(false), + cmdkit.BoolOption("debug", "D", "Operate in debug mode."), + cmdkit.BoolOption("help", "Show the full command help text."), + cmdkit.BoolOption("h", "Show a short version of the command help text."), + cmdkit.BoolOption("local", "L", "Run the command locally, instead of using the daemon."), cmdkit.StringOption(ApiOption, "Use a specific API instance (defaults to /ip4/127.0.0.1/tcp/5001)"), }, } diff --git a/core/commands/stat.go b/core/commands/stat.go index 3fd48214b..adf481fca 100644 --- a/core/commands/stat.go +++ b/core/commands/stat.go @@ -72,7 +72,7 @@ Example: Options: []cmdkit.Option{ cmdkit.StringOption("peer", "p", "Specify a peer to print bandwidth for."), cmdkit.StringOption("proto", "t", "Specify a protocol to print bandwidth for."), - cmdkit.BoolOption("poll", "Print bandwidth at an interval.").Default(false), + cmdkit.BoolOption("poll", "Print bandwidth at an interval."), cmdkit.StringOption("interval", "i", `Time interval to wait between updating output, if 'poll' is true. This accepts durations such as "300s", "1.5h" or "2h45m". Valid time units are: diff --git a/core/commands/swarm.go b/core/commands/swarm.go index 29aef9038..a09bc83b4 100644 --- a/core/commands/swarm.go +++ b/core/commands/swarm.go @@ -279,7 +279,7 @@ var swarmAddrsLocalCmd = &cmds.Command{ `, }, Options: []cmdkit.Option{ - cmdkit.BoolOption("id", "Show peer ID in addresses.").Default(false), + cmdkit.BoolOption("id", "Show peer ID in addresses."), }, Run: func(req cmds.Request, res cmds.Response) { iCtx := req.InvocContext() diff --git a/core/commands/version.go b/core/commands/version.go index 822973c15..74a5e59cf 100644 --- a/core/commands/version.go +++ b/core/commands/version.go @@ -28,10 +28,10 @@ var VersionCmd = &cmds.Command{ }, Options: []cmdkit.Option{ - cmdkit.BoolOption("number", "n", "Only show the version number.").Default(false), - cmdkit.BoolOption("commit", "Show the commit hash.").Default(false), - cmdkit.BoolOption("repo", "Show repo version.").Default(false), - cmdkit.BoolOption("all", "Show all version information").Default(false), + cmdkit.BoolOption("number", "n", "Only show the version number."), + cmdkit.BoolOption("commit", "Show the commit hash."), + cmdkit.BoolOption("repo", "Show repo version."), + cmdkit.BoolOption("all", "Show all version information"), }, Run: func(req cmds.Request, res cmds.Response) { res.SetOutput(&VersionOutput{