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 {
696696 }
697697 clone := * c
698698 clone .cmdable = clone .Process
699- clone .hooks .Lock ()
699+ clone .hooks .lock ()
700700 clone .ctx = ctx
701701 return & clone
702702}
Original file line number Diff line number Diff line change @@ -32,13 +32,13 @@ type hooks struct {
3232 hooks []Hook
3333}
3434
35- func (hs * hooks ) Lock () {
35+ func (hs * hooks ) lock () {
3636 hs .hooks = hs .hooks [:len (hs .hooks ):len (hs .hooks )]
3737}
3838
39- func (hs hooks ) Clone () hooks {
39+ func (hs hooks ) clone () hooks {
4040 clone := hs
41- clone .Lock ()
41+ clone .lock ()
4242 return clone
4343}
4444
@@ -526,7 +526,7 @@ func NewClient(opt *Options) *Client {
526526func (c * Client ) clone () * Client {
527527 clone := * c
528528 clone .cmdable = clone .Process
529- clone .hooks .Lock ()
529+ clone .hooks .lock ()
530530 return & clone
531531}
532532
Original file line number Diff line number Diff line change @@ -407,7 +407,7 @@ func (c *Ring) WithContext(ctx context.Context) *Ring {
407407 }
408408 clone := * c
409409 clone .cmdable = clone .Process
410- clone .hooks .Lock ()
410+ clone .hooks .lock ()
411411 clone .ctx = ctx
412412 return & clone
413413}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ func (c *Client) newTx(ctx context.Context) *Tx {
2828 opt : c .opt ,
2929 connPool : pool .NewStickyConnPool (c .connPool .(* pool.ConnPool ), true ),
3030 },
31- hooks : c .hooks .Clone (),
31+ hooks : c .hooks .clone (),
3232 ctx : ctx ,
3333 }
3434 tx .init ()
@@ -50,7 +50,7 @@ func (c *Tx) WithContext(ctx context.Context) *Tx {
5050 }
5151 clone := * c
5252 clone .init ()
53- clone .hooks .Lock ()
53+ clone .hooks .lock ()
5454 clone .ctx = ctx
5555 return & clone
5656}
You can’t perform that action at this time.
0 commit comments