1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-10 14:34:24 +08:00

Fix cli flag orders (long, short)

License: MIT
Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
rht
2015-10-19 12:53:23 +07:00
parent 2afe4a4d23
commit c091cf5abe
2 changed files with 3 additions and 3 deletions

View File

@ -163,8 +163,8 @@ const (
)
// options that are used by this package
var OptionEncodingType = StringOption(EncShort, EncLong, "The encoding type the output should be encoded with (json, xml, or text)")
var OptionRecursivePath = BoolOption(RecShort, RecLong, "Add directory paths recursively")
var OptionEncodingType = StringOption(EncLong, EncShort, "The encoding type the output should be encoded with (json, xml, or text)")
var OptionRecursivePath = BoolOption(RecLong, RecShort, "Add directory paths recursively")
var OptionStreamChannels = BoolOption(ChanOpt, "Stream channel output")
var OptionTimeout = StringOption(TimeoutOpt, "set a global timeout on the command")

View File

@ -53,7 +53,7 @@ ipfs id supports the format option for output with the following keys:
cmds.StringArg("peerid", false, false, "peer.ID of node to look up").EnableStdin(),
},
Options: []cmds.Option{
cmds.StringOption("f", "format", "optional output format"),
cmds.StringOption("format", "f", "optional output format"),
},
Run: func(req cmds.Request, res cmds.Response) {
node, err := req.InvocContext().GetNode()