Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
liumiuyong committed May 10, 2021
1 parent bb60cea commit 4e75052
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/redis_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3657,7 +3657,7 @@ class CommandCommand : public Commander {
public:
Status Execute(Server *svr, Connection *conn, std::string *output) override {
if (args_.size() == 1) {
svr->GetCommandsInfo(output);
svr->GetAllCommandsInfo(output);
} else {
std::string sub_command = Util::ToLower(args_[1]);
if ((sub_command == "count" && args_.size() != 2) ||
Expand Down
2 changes: 1 addition & 1 deletion src/server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1176,7 +1176,7 @@ std::string Server::GetCommandInfo(const Redis::CommandAttributes* command_attri
return command;
}

void Server::GetCommandsInfo(std::string *info) {
void Server::GetAllCommandsInfo(std::string *info) {
info->append(Redis::MultiLen(commands_.size()));
for (const auto &iter : commands_) {
auto command_attribute = iter.second;
Expand Down
2 changes: 1 addition & 1 deletion src/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Server {
void populateCommands();
bool IsCommandExists(const std::string &name);
Status LookupAndCreateCommand(const std::string &cmd_name, std::unique_ptr<Redis::Commander> *cmd);
void GetCommandsInfo(std::string *info);
void GetAllCommandsInfo(std::string *info);
void GetCommandsInfo(std::string *info, const std::vector<std::string> &cmd_names);
std::string GetCommandInfo(const Redis::CommandAttributes* command_attributes);
Status GetKeysFromCommand(const std::string &name, int argc, std::vector<int> *keys_indexes);
Expand Down

0 comments on commit 4e75052

Please sign in to comment.