@@ -981,7 +981,7 @@ func (c *ClusterClient) Process(ctx context.Context, cmd Cmder) error {
981981}
982982
983983func (c * ClusterClient ) process (ctx context.Context , cmd Cmder ) error {
984- slot := c .cmdSlot (ctx , cmd )
984+ slot := c .cmdSlot (cmd )
985985 var node * clusterNode
986986 var moved bool
987987 var ask bool
@@ -1329,7 +1329,7 @@ func (c *ClusterClient) mapCmdsByNode(ctx context.Context, cmdsMap *cmdsMap, cmd
13291329
13301330 if c .opt .ReadOnly && c .cmdsAreReadOnly (ctx , cmds ) {
13311331 for _ , cmd := range cmds {
1332- slot := c .cmdSlot (ctx , cmd )
1332+ slot := c .cmdSlot (cmd )
13331333 node , err := c .slotReadOnlyNode (state , slot )
13341334 if err != nil {
13351335 return err
@@ -1340,7 +1340,7 @@ func (c *ClusterClient) mapCmdsByNode(ctx context.Context, cmdsMap *cmdsMap, cmd
13401340 }
13411341
13421342 for _ , cmd := range cmds {
1343- slot := c .cmdSlot (ctx , cmd )
1343+ slot := c .cmdSlot (cmd )
13441344 node , err := state .slotMasterNode (slot )
13451345 if err != nil {
13461346 return err
@@ -1540,7 +1540,7 @@ func (c *ClusterClient) processTxPipeline(ctx context.Context, cmds []Cmder) err
15401540func (c * ClusterClient ) mapCmdsBySlot (ctx context.Context , cmds []Cmder ) map [int ][]Cmder {
15411541 cmdsMap := make (map [int ][]Cmder )
15421542 for _ , cmd := range cmds {
1543- slot := c .cmdSlot (ctx , cmd )
1543+ slot := c .cmdSlot (cmd )
15441544 cmdsMap [slot ] = append (cmdsMap [slot ], cmd )
15451545 }
15461546 return cmdsMap
@@ -1569,7 +1569,7 @@ func (c *ClusterClient) processTxPipelineNode(
15691569}
15701570
15711571func (c * ClusterClient ) processTxPipelineNodeConn (
1572- ctx context.Context , node * clusterNode , cn * pool.Conn , cmds []Cmder , failedCmds * cmdsMap ,
1572+ ctx context.Context , _ * clusterNode , cn * pool.Conn , cmds []Cmder , failedCmds * cmdsMap ,
15731573) error {
15741574 if err := cn .WithWriter (c .context (ctx ), c .opt .WriteTimeout , func (wr * proto.Writer ) error {
15751575 return writeCmds (wr , cmds )
@@ -1858,7 +1858,7 @@ func (c *ClusterClient) cmdInfo(ctx context.Context, name string) *CommandInfo {
18581858 return info
18591859}
18601860
1861- func (c * ClusterClient ) cmdSlot (ctx context. Context , cmd Cmder ) int {
1861+ func (c * ClusterClient ) cmdSlot (cmd Cmder ) int {
18621862 args := cmd .Args ()
18631863 if args [0 ] == "cluster" && (args [1 ] == "getkeysinslot" || args [1 ] == "countkeysinslot" ) {
18641864 return args [2 ].(int )
0 commit comments