add set/get cmd

This commit is contained in:
hdt3213
2019-06-23 20:10:31 +08:00
committed by wyb
parent da409ff293
commit b51760bbab
12 changed files with 345 additions and 54 deletions

25
src/redis/reply/consts.go Normal file
View File

@@ -0,0 +1,25 @@
package reply
type PongReply struct {}
var PongBytes = []byte("+PONG\r\n")
func (r *PongReply)ToBytes()[]byte {
return PongBytes
}
type OkReply struct {}
var OkBytes = []byte("+OK\r\n")
func (r *OkReply)ToBytes()[]byte {
return OkBytes
}
var nullBulkBytes = []byte("$-1\r\n")
type NullBulkReply struct {}
func (r *NullBulkReply)ToBytes()[]byte {
return nullBulkBytes
}