commands: Added basic methods to Request
Matt Bell committed
Oct 10, 2014 at 12:38 UTC
d1595ce34cb388db250ab69a28078a31505f0a70
1 file changed
+7
-5
commands/request.go
+7
-5
@@ -3,18 +3,20 @@ package commands
3
// Request represents a call to a command from a consumer
4
type Request struct {
5
options map[string]interface{}
6
+ arguments []string
7
}
8
8
-/*func (r *Request) Option(name string) interface{} {
9
-
9
+func (r *Request) Option(name string) interface{} {
10
+ return r.options[name]
11
}
12
12
-func (r *Request) Arguments() interface{} {
13
-
14
-}*/
13
+func (r *Request) Arguments() []string {
14
+ return r.arguments
15
+}
16
17
func NewRequest() *Request {
18
return &Request{
19
make(map[string]interface{}),
20
+ make([]string, 0),
21
}
22
}