Skip to content

Commit

Permalink
[redis] Code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
andyone committed Sep 15, 2023
1 parent 10f1be3 commit a0583d7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,24 +291,6 @@ func getClient(port int, timeout time.Duration) *redy.Client {
return client
}

// getRenamedCommand returns command with prefix
func getRenamedCommand(rc *redy.Client, rn map[string]string, command string) string {
renamedCommand, ok := rn[strings.ToUpper(command)]

if !ok {
return command
}

// Check that renamed command is supported
resp, err := rc.Cmd("COMMAND", "INFO", renamedCommand).Array()

if err != nil || len(resp) == 0 || resp[0].HasType(NIL) {
return command
}

return renamedCommand
}

// getHumanSize returns size in human readable format
func getHumanSize(size uint64) string {
f := float64(size)
Expand Down

0 comments on commit a0583d7

Please sign in to comment.