mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 22:49:13 +08:00
Fix cli flag orders (long, short)
License: MIT Signed-off-by: rht <rhtbot@gmail.com>
This commit is contained in:
@ -163,8 +163,8 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// options that are used by this package
|
// 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 OptionEncodingType = StringOption(EncLong, EncShort, "The encoding type the output should be encoded with (json, xml, or text)")
|
||||||
var OptionRecursivePath = BoolOption(RecShort, RecLong, "Add directory paths recursively")
|
var OptionRecursivePath = BoolOption(RecLong, RecShort, "Add directory paths recursively")
|
||||||
var OptionStreamChannels = BoolOption(ChanOpt, "Stream channel output")
|
var OptionStreamChannels = BoolOption(ChanOpt, "Stream channel output")
|
||||||
var OptionTimeout = StringOption(TimeoutOpt, "set a global timeout on the command")
|
var OptionTimeout = StringOption(TimeoutOpt, "set a global timeout on the command")
|
||||||
|
|
||||||
|
@ -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(),
|
cmds.StringArg("peerid", false, false, "peer.ID of node to look up").EnableStdin(),
|
||||||
},
|
},
|
||||||
Options: []cmds.Option{
|
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) {
|
Run: func(req cmds.Request, res cmds.Response) {
|
||||||
node, err := req.InvocContext().GetNode()
|
node, err := req.InvocContext().GetNode()
|
||||||
|
Reference in New Issue
Block a user