From b32ffae25521da88f3c1238aadd75828f9c95f1b Mon Sep 17 00:00:00 2001 From: chenyuanfei Date: Tue, 12 Nov 2019 15:08:59 +0800 Subject: [PATCH] set key to lower for cmdsInfoCache.Get() --- command.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/command.go b/command.go index 16e087e1..8c16d2c0 100644 --- a/command.go +++ b/command.go @@ -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 })