mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
fix: invalid type assert in stringArg
This commit is contained in:
@ -151,8 +151,13 @@ func (cmd *baseCmd) stringArg(pos int) string {
|
||||
if pos < 0 || pos >= len(cmd.args) {
|
||||
return ""
|
||||
}
|
||||
s, _ := cmd.args[pos].(string)
|
||||
return s
|
||||
arg := cmd.args[pos]
|
||||
switch v := arg.(type) {
|
||||
case string:
|
||||
return v
|
||||
default:
|
||||
return fmt.Sprintf("%v", v)
|
||||
}
|
||||
}
|
||||
|
||||
func (cmd *baseCmd) firstKeyPos() int8 {
|
||||
|
Reference in New Issue
Block a user