set key to lower for cmdsInfoCache.Get()

This commit is contained in:
chenyuanfei 2019-11-12 15:08:59 +08:00
parent 726ddef6f5
commit b32ffae255
1 changed files with 6 additions and 0 deletions

View File

@ -2006,6 +2006,12 @@ 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]
}
}
c.cmds = cmds
return nil
})