mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-22 00:09:30 +08:00
bugfix: Fix the issue with the result format returned by the randomkey command
This commit is contained in:
@@ -831,8 +831,7 @@ func getRandomKey(db *DB, args [][]byte) redis.Reply {
|
|||||||
if len(k) == 0 {
|
if len(k) == 0 {
|
||||||
return &protocol.NullBulkReply{}
|
return &protocol.NullBulkReply{}
|
||||||
}
|
}
|
||||||
var key []byte
|
return protocol.MakeBulkReply([]byte(k[0]))
|
||||||
return protocol.MakeBulkReply(strconv.AppendQuote(key, k[0]))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Reference in New Issue
Block a user