mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Export Cmder.Args
This commit is contained in:
@ -535,13 +535,13 @@ func (c *ClusterClient) cmdInfo(name string) *CommandInfo {
|
||||
|
||||
func (c *ClusterClient) cmdSlot(cmd Cmder) int {
|
||||
cmdInfo := c.cmdInfo(cmd.Name())
|
||||
firstKey := cmd.arg(cmdFirstKeyPos(cmd, cmdInfo))
|
||||
firstKey := cmd.stringArg(cmdFirstKeyPos(cmd, cmdInfo))
|
||||
return hashtag.Slot(firstKey)
|
||||
}
|
||||
|
||||
func (c *ClusterClient) cmdSlotAndNode(state *clusterState, cmd Cmder) (int, *clusterNode, error) {
|
||||
cmdInfo := c.cmdInfo(cmd.Name())
|
||||
firstKey := cmd.arg(cmdFirstKeyPos(cmd, cmdInfo))
|
||||
firstKey := cmd.stringArg(cmdFirstKeyPos(cmd, cmdInfo))
|
||||
slot := hashtag.Slot(firstKey)
|
||||
|
||||
if cmdInfo != nil && cmdInfo.ReadOnly && c.opt.ReadOnly {
|
||||
|
Reference in New Issue
Block a user