forked from mirror/redis
Cleanup
This commit is contained in:
parent
eb64034d44
commit
dab9d3f802
2
Makefile
2
Makefile
|
@ -4,8 +4,6 @@ all: testdeps
|
|||
go test ./... -run=NONE -bench=. -benchmem
|
||||
env GOOS=linux GOARCH=386 go test ./...
|
||||
go vet
|
||||
go get github.com/gordonklaus/ineffassign
|
||||
ineffassign .
|
||||
golangci-lint run
|
||||
|
||||
testdeps: testdata/redis/src/redis-server
|
||||
|
|
11
command.go
11
command.go
|
@ -2005,12 +2005,15 @@ 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]
|
||||
|
||||
// Extensions have cmd names in upper case. Convert them to lower case.
|
||||
for k, v := range cmds {
|
||||
lower := internal.ToLower(k)
|
||||
if lower != k {
|
||||
cmds[lower] = v
|
||||
}
|
||||
}
|
||||
|
||||
c.cmds = cmds
|
||||
return nil
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue