Skip to content

Commit dab9d3f

Browse files
committed
Cleanup
1 parent eb64034 commit dab9d3f

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ all: testdeps
44
go test ./... -run=NONE -bench=. -benchmem
55
env GOOS=linux GOARCH=386 go test ./...
66
go vet
7-
go get github.com/gordonklaus/ineffassign
8-
ineffassign .
97
golangci-lint run
108

119
testdeps: testdata/redis/src/redis-server

command.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,12 +2005,15 @@ func (c *cmdsInfoCache) Get() (map[string]*CommandInfo, error) {
20052005
if err != nil {
20062006
return err
20072007
}
2008-
for key := range cmds {
2009-
lowerKey := internal.ToLower(key)
2010-
if key != lowerKey {
2011-
cmds[lowerKey] = cmds[key]
2008+
2009+
// Extensions have cmd names in upper case. Convert them to lower case.
2010+
for k, v := range cmds {
2011+
lower := internal.ToLower(k)
2012+
if lower != k {
2013+
cmds[lower] = v
20122014
}
20132015
}
2016+
20142017
c.cmds = cmds
20152018
return nil
20162019
})

0 commit comments

Comments
 (0)