mirror of https://github.com/go-redis/redis.git
Cleanup code
This commit is contained in:
parent
dc9d5006b3
commit
18dcec2144
11
command.go
11
command.go
|
@ -149,14 +149,6 @@ func (cmd *baseCmd) setErr(e error) {
|
||||||
cmd.err = e
|
cmd.err = e
|
||||||
}
|
}
|
||||||
|
|
||||||
func newBaseCmd(args []interface{}) baseCmd {
|
|
||||||
if len(args) > 0 {
|
|
||||||
// Cmd name is expected to be in lower case.
|
|
||||||
args[0] = internal.ToLower(args[0].(string))
|
|
||||||
}
|
|
||||||
return baseCmd{_args: args}
|
|
||||||
}
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
type Cmd struct {
|
type Cmd struct {
|
||||||
|
@ -840,9 +832,8 @@ func NewGeoLocationCmd(q *GeoRadiusQuery, args ...interface{}) *GeoLocationCmd {
|
||||||
if q.Sort != "" {
|
if q.Sort != "" {
|
||||||
args = append(args, q.Sort)
|
args = append(args, q.Sort)
|
||||||
}
|
}
|
||||||
cmd := newBaseCmd(args)
|
|
||||||
return &GeoLocationCmd{
|
return &GeoLocationCmd{
|
||||||
baseCmd: cmd,
|
baseCmd: baseCmd{_args: args},
|
||||||
q: q,
|
q: q,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue