mirror of
https://github.com/ipfs/kubo.git
synced 2025-10-25 10:27:01 +08:00
commands: Added 'Description' fields to Command, Argument, Option
This commit is contained in:
committed by
Juan Batiz-Benet
parent
538dac153b
commit
351ed9589a
@ -14,8 +14,9 @@ const (
|
||||
|
||||
// Option is used to specify a field that will be provided by a consumer
|
||||
type Option struct {
|
||||
Names []string // a list of unique names to
|
||||
Type reflect.Kind // value must be this type
|
||||
Names []string // a list of unique names to
|
||||
Type reflect.Kind // value must be this type
|
||||
Description string // a short string to describe this option
|
||||
|
||||
// TODO: add more features(?):
|
||||
//Default interface{} // the default value (ignored if `Required` is true)
|
||||
@ -30,7 +31,8 @@ const (
|
||||
|
||||
// options that are used by this package
|
||||
var globalOptions = []Option{
|
||||
Option{[]string{EncShort, EncLong}, String},
|
||||
Option{[]string{EncShort, EncLong}, String,
|
||||
"The encoding type the output should be encoded with (json, xml, or text)"},
|
||||
}
|
||||
|
||||
// the above array of Options, wrapped in a Command
|
||||
|
||||
Reference in New Issue
Block a user