File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ func (c *ClusterClient) WithContext(ctx context.Context) *ClusterClient {
696
696
}
697
697
clone := * c
698
698
clone .cmdable = clone .Process
699
- clone .hooks .Lock ()
699
+ clone .hooks .lock ()
700
700
clone .ctx = ctx
701
701
return & clone
702
702
}
Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ type hooks struct {
32
32
hooks []Hook
33
33
}
34
34
35
- func (hs * hooks ) Lock () {
35
+ func (hs * hooks ) lock () {
36
36
hs .hooks = hs .hooks [:len (hs .hooks ):len (hs .hooks )]
37
37
}
38
38
39
- func (hs hooks ) Clone () hooks {
39
+ func (hs hooks ) clone () hooks {
40
40
clone := hs
41
- clone .Lock ()
41
+ clone .lock ()
42
42
return clone
43
43
}
44
44
@@ -526,7 +526,7 @@ func NewClient(opt *Options) *Client {
526
526
func (c * Client ) clone () * Client {
527
527
clone := * c
528
528
clone .cmdable = clone .Process
529
- clone .hooks .Lock ()
529
+ clone .hooks .lock ()
530
530
return & clone
531
531
}
532
532
Original file line number Diff line number Diff line change @@ -407,7 +407,7 @@ func (c *Ring) WithContext(ctx context.Context) *Ring {
407
407
}
408
408
clone := * c
409
409
clone .cmdable = clone .Process
410
- clone .hooks .Lock ()
410
+ clone .hooks .lock ()
411
411
clone .ctx = ctx
412
412
return & clone
413
413
}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ func (c *Client) newTx(ctx context.Context) *Tx {
28
28
opt : c .opt ,
29
29
connPool : pool .NewStickyConnPool (c .connPool .(* pool.ConnPool ), true ),
30
30
},
31
- hooks : c .hooks .Clone (),
31
+ hooks : c .hooks .clone (),
32
32
ctx : ctx ,
33
33
}
34
34
tx .init ()
@@ -50,7 +50,7 @@ func (c *Tx) WithContext(ctx context.Context) *Tx {
50
50
}
51
51
clone := * c
52
52
clone .init ()
53
- clone .hooks .Lock ()
53
+ clone .hooks .lock ()
54
54
clone .ctx = ctx
55
55
return & clone
56
56
}
You can’t perform that action at this time.
0 commit comments