mirror of
https://github.com/redis/go-redis.git
synced 2025-07-28 06:42:00 +03:00
Cleanup
This commit is contained in:
11
command.go
11
command.go
@ -2005,12 +2005,15 @@ func (c *cmdsInfoCache) Get() (map[string]*CommandInfo, error) {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
for key := range cmds {
|
||||
lowerKey := internal.ToLower(key)
|
||||
if key != lowerKey {
|
||||
cmds[lowerKey] = cmds[key]
|
||||
|
||||
// Extensions have cmd names in upper case. Convert them to lower case.
|
||||
for k, v := range cmds {
|
||||
lower := internal.ToLower(k)
|
||||
if lower != k {
|
||||
cmds[lower] = v
|
||||
}
|
||||
}
|
||||
|
||||
c.cmds = cmds
|
||||
return nil
|
||||
})
|
||||
|
Reference in New Issue
Block a user