Rename copy to clone

This commit is contained in:
Vladimir Mihailenco 2019-03-05 16:10:34 +02:00
parent 4b1665dfdc
commit b665d8fcf2
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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
}