@@ -989,7 +989,7 @@ func (c *ClusterClient) Process(ctx context.Context, cmd Cmder) error {
989989}
990990
991991func (c * ClusterClient ) process (ctx context.Context , cmd Cmder ) error {
992- slot := c .cmdSlot (ctx , cmd )
992+ slot := c .cmdSlot (cmd )
993993 var node * clusterNode
994994 var moved bool
995995 var ask bool
@@ -1480,7 +1480,7 @@ func (c *ClusterClient) mapCmdsByNode(ctx context.Context, cmdsMap *cmdsMap, cmd
14801480
14811481 if c .opt .ReadOnly && c .cmdsAreReadOnly (ctx , cmds ) {
14821482 for _ , cmd := range cmds {
1483- slot := c .cmdSlot (ctx , cmd )
1483+ slot := c .cmdSlot (cmd )
14841484 node , err := c .slotReadOnlyNode (state , slot )
14851485 if err != nil {
14861486 return err
@@ -1491,7 +1491,7 @@ func (c *ClusterClient) mapCmdsByNode(ctx context.Context, cmdsMap *cmdsMap, cmd
14911491 }
14921492
14931493 for _ , cmd := range cmds {
1494- slot := c .cmdSlot (ctx , cmd )
1494+ slot := c .cmdSlot (cmd )
14951495 node , err := state .slotMasterNode (slot )
14961496 if err != nil {
14971497 return err
@@ -1635,7 +1635,7 @@ func (c *ClusterClient) processTxPipeline(ctx context.Context, cmds []Cmder) err
16351635func (c * ClusterClient ) mapCmdsBySlot (ctx context.Context , cmds []Cmder ) map [int ][]Cmder {
16361636 cmdsMap := make (map [int ][]Cmder )
16371637 for _ , cmd := range cmds {
1638- slot := c .cmdSlot (ctx , cmd )
1638+ slot := c .cmdSlot (cmd )
16391639 cmdsMap [slot ] = append (cmdsMap [slot ], cmd )
16401640 }
16411641 return cmdsMap
@@ -1664,7 +1664,7 @@ func (c *ClusterClient) processTxPipelineNode(
16641664}
16651665
16661666func (c * ClusterClient ) processTxPipelineNodeConn (
1667- ctx context.Context , node * clusterNode , cn * pool.Conn , cmds []Cmder , failedCmds * cmdsMap ,
1667+ ctx context.Context , _ * clusterNode , cn * pool.Conn , cmds []Cmder , failedCmds * cmdsMap ,
16681668) error {
16691669 if err := cn .WithWriter (c .context (ctx ), c .opt .WriteTimeout , func (wr * proto.Writer ) error {
16701670 return writeCmds (wr , cmds )
@@ -1934,7 +1934,7 @@ func (c *ClusterClient) cmdInfo(ctx context.Context, name string) *CommandInfo {
19341934 return info
19351935}
19361936
1937- func (c * ClusterClient ) cmdSlot (ctx context. Context , cmd Cmder ) int {
1937+ func (c * ClusterClient ) cmdSlot (cmd Cmder ) int {
19381938 args := cmd .Args ()
19391939 if args [0 ] == "cluster" && (args [1 ] == "getkeysinslot" || args [1 ] == "countkeysinslot" ) {
19401940 return args [2 ].(int )
0 commit comments