From b665d8fcf239d92278698ea1ecd5e5aaafef26b4 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Tue, 5 Mar 2019 16:10:34 +0200 Subject: [PATCH] Rename copy to clone --- cluster.go | 4 ++-- ring.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cluster.go b/cluster.go index 0cecc62c..e3a6591e 100644 --- a/cluster.go +++ b/cluster.go @@ -703,12 +703,12 @@ func (c *ClusterClient) WithContext(ctx context.Context) *ClusterClient { if ctx == nil { panic("nil context") } - c2 := c.copy() + c2 := c.clone() c2.ctx = ctx return c2 } -func (c *ClusterClient) copy() *ClusterClient { +func (c *ClusterClient) clone() *ClusterClient { cp := *c cp.init() return &cp diff --git a/ring.go b/ring.go index 250e5f64..aa475432 100644 --- a/ring.go +++ b/ring.go @@ -381,12 +381,12 @@ func (c *Ring) WithContext(ctx context.Context) *Ring { if ctx == nil { panic("nil context") } - c2 := c.copy() + c2 := c.clone() c2.ctx = ctx return c2 } -func (c *Ring) copy() *Ring { +func (c *Ring) clone() *Ring { cp := *c return &cp }