mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 08:46:56 +08:00
refactor command
command
This commit is contained in:
@@ -94,13 +94,13 @@ func (server *Server) Exec(c redis.Connection, cmdLine [][]byte) (result redis.R
|
||||
if cmdName == "auth" {
|
||||
return Auth(c, cmdLine[1:])
|
||||
}
|
||||
if !isAuthenticated(c) {
|
||||
return protocol.MakeErrReply("NOAUTH Authentication required")
|
||||
}
|
||||
// info
|
||||
if cmdName == "info" {
|
||||
return Info(c, cmdLine)
|
||||
}
|
||||
if !isAuthenticated(c) {
|
||||
return protocol.MakeErrReply("NOAUTH Authentication required")
|
||||
}
|
||||
if cmdName == "slaveof" {
|
||||
if c != nil && c.InMultiState() {
|
||||
return protocol.MakeErrReply("cannot use slave of database within multi")
|
||||
|
Reference in New Issue
Block a user