1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 10:49:24 +08:00

commands: Created Option struct

This commit is contained in:
Matt Bell
2014-10-08 14:28:39 -07:00
committed by Juan Batiz-Benet
parent dd2a10509f
commit 30ea427b7b

20
commands/option.go Normal file
View File

@ -0,0 +1,20 @@
package commands
import "reflect"
const (
Invalid = reflect.Invalid
Bool = reflect.Bool
Int = reflect.Int
Uint = reflect.Uint
Float = reflect.Float32
String = reflect.String
)
// 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
//Default interface{} // the default value (ignored if `Required` is true)
//Required bool // whether or not the option must be provided
}