mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Convert bytes to string in Cmd.
This commit is contained in:
@ -165,7 +165,12 @@ func (cmd *Cmd) readReply(cn *pool.Conn) error {
|
||||
cmd.err = err
|
||||
return cmd.err
|
||||
}
|
||||
cmd.val = val
|
||||
if b, ok := val.([]byte); ok {
|
||||
// Bytes must be copied, because underlying memory is reused.
|
||||
cmd.val = string(b)
|
||||
} else {
|
||||
cmd.val = val
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user