mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-23 19:37:46 +08:00
commands: Created a list of global options (for options owned by commands package)
This commit is contained in:
parent
e593c180fe
commit
47ebf174f4
@ -15,6 +15,17 @@ const (
|
||||
type Option struct {
|
||||
Names []string // a list of unique names to
|
||||
Type reflect.Kind // value must be this type
|
||||
|
||||
// TODO: add more features(?):
|
||||
//Default interface{} // the default value (ignored if `Required` is true)
|
||||
//Required bool // whether or not the option must be provided
|
||||
}
|
||||
|
||||
// options that are used by this package
|
||||
var globalOptions []Option = []Option{
|
||||
Option{ []string{ "enc", "encoding" }, String },
|
||||
}
|
||||
// the above array of Options, wrapped in a Command
|
||||
var globalCommand *Command = &Command{
|
||||
Options: globalOptions,
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user