diff --git a/commands/request.go b/commands/request.go index 51f0d4941..cddf0d42b 100644 --- a/commands/request.go +++ b/commands/request.go @@ -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{