From 289bce6bdb67fc28ba3c69dcaac01e67ef86b903 Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Mon, 27 Oct 2014 18:13:07 -0700 Subject: [PATCH] commands: Added Request#SetContext() --- commands/request.go | 5 +++++ 1 file changed, 5 insertions(+) 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{