Skip to content

Commit

Permalink
bugfix: Fix the issue with the result format returned by the randomke…
Browse files Browse the repository at this point in the history
…y command
  • Loading branch information
NaNShaner authored and HDT3213 committed May 4, 2024
1 parent 43c378c commit dd073b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions database/string.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,8 +831,7 @@ func getRandomKey(db *DB, args [][]byte) redis.Reply {
if len(k) == 0 {
return &protocol.NullBulkReply{}
}
var key []byte
return protocol.MakeBulkReply(strconv.AppendQuote(key, k[0]))
return protocol.MakeBulkReply([]byte(k[0]))
}

func init() {
Expand Down

0 comments on commit dd073b0

Please sign in to comment.