Skip to content

Commit

Permalink
set key to lower for cmdsInfoCache.Get()
Browse files Browse the repository at this point in the history
  • Loading branch information
WTIFS committed Nov 12, 2019
1 parent 726ddef commit b32ffae
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions command.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down

0 comments on commit b32ffae

Please sign in to comment.