From 2265c3fdbb459cd8bd014fbd074b54810955e301 Mon Sep 17 00:00:00 2001 From: Ken Date: Wed, 13 Feb 2019 11:21:38 +0800 Subject: [PATCH] fix gocql.Query.WithContext retrun shallow copy bug --- queryx_wrap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/queryx_wrap.go b/queryx_wrap.go index 23d9d43..c7649f2 100644 --- a/queryx_wrap.go +++ b/queryx_wrap.go @@ -86,7 +86,7 @@ func (q *Queryx) RoutingKey(routingKey []byte) *Queryx { // query, queries will be canceled and return once the context is // canceled. func (q *Queryx) WithContext(ctx context.Context) *Queryx { - q.Query.WithContext(ctx) + q.Query = q.Query.WithContext(ctx) return q }