go-redis
go-redis copied to clipboard
[Enhancement/Cleanup] Remove unused argument from `cmdSlot` function in osscluster
Description
The cmdSlot
function in the osscluster.go file accepts two parameters :
- context
- Cmder
The context
argument is not being used in the the function and should be safe to remove.
Code Snippet:
func (c *ClusterClient) cmdSlot(ctx context.Context, cmd Cmder) int {
args := cmd.Args()
if args[0] == "cluster" && args[1] == "getkeysinslot" {
return args[2].(int)
}
return cmdSlot(cmd, cmdFirstKeyPos(cmd))
}
CodeRef: https://github.com/redis/go-redis/blob/master/osscluster.go#L1814
What I expect to see?
- Remove context from the
cmdSlot
function definition and all the instances where we are calling this from.
What version of go-redis are you using? checked the same on the master branch