commands: Created Option struct
Matt Bell committed
Oct 8, 2014 at 14:28 UTC
30ea427b7b8a68e66f3bbda7c1c926e1dc0b7a1f
1 file changed
+20
commands/option.go
new
+20
@@ -0,0 +1,20 @@
1
+package commands
2
+
3
+import "reflect"
4
+
5
+const (
6
+ Invalid = reflect.Invalid
7
+ Bool = reflect.Bool
8
+ Int = reflect.Int
9
+ Uint = reflect.Uint
10
+ Float = reflect.Float32
11
+ String = reflect.String
12
+)
13
+
14
+// Option is used to specify a field that will be provided by a consumer
15
+type Option struct {
16
+ Names []string // a list of unique names to
17
+ Type reflect.Kind // value must be this type
18
+ //Default interface{} // the default value (ignored if `Required` is true)
19
+ //Required bool // whether or not the option must be provided
20
+}