mirror of
https://github.com/HDT3213/godis.git
synced 2025-11-02 12:54:01 +08:00
add set/get cmd
This commit is contained in:
25
src/redis/reply/consts.go
Normal file
25
src/redis/reply/consts.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user