commands: Added Request#SetContext()

This commit is contained in:
Matt Bell 2014-10-27 18:13:07 -07:00 committed by Juan Batiz-Benet
parent 48bd73c530
commit 289bce6bdb

View File

@ -28,6 +28,7 @@ type Request interface {
Stream() io.Reader
SetStream(io.Reader)
Context() *Context
SetContext(Context)
ConvertOptions(options map[string]Option) error
}
@ -84,6 +85,10 @@ func (r *request) Context() *Context {
return &r.ctx
}
func (r *request) SetContext(ctx Context) {
r.ctx = ctx
}
type converter func(string) (interface{}, error)
var converters = map[reflect.Kind]converter{