mirror of
https://github.com/redis/go-redis.git
synced 2025-04-19 07:22:17 +03:00
Merge pull request #1189 from WTIFS/master
Set key to lowercase in cmdsInfoCache.Get()
This commit is contained in:
commit
eb64034d44
@ -2005,6 +2005,12 @@ func (c *cmdsInfoCache) Get() (map[string]*CommandInfo, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
for key := range cmds {
|
||||||
|
lowerKey := internal.ToLower(key)
|
||||||
|
if key != lowerKey {
|
||||||
|
cmds[lowerKey] = cmds[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
c.cmds = cmds
|
c.cmds = cmds
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user