mirror of
https://github.com/redis/go-redis.git
synced 2025-07-31 05:04:23 +03:00
Rename GeoPosition to GeoPos for consistency with Redis Server. Simplify code where possible.
This commit is contained in:
10
commands.go
10
commands.go
@ -234,7 +234,7 @@ type Cmdable interface {
|
||||
ClusterAddSlots(slots ...int) *StatusCmd
|
||||
ClusterAddSlotsRange(min, max int) *StatusCmd
|
||||
GeoAdd(key string, geoLocation ...*GeoLocation) *IntCmd
|
||||
GeoPos(key string, name ...string) *GeoPosCmd
|
||||
GeoPos(key string, members ...string) *GeoPosCmd
|
||||
GeoRadius(key string, longitude, latitude float64, query *GeoRadiusQuery) *GeoLocationCmd
|
||||
GeoRadiusByMember(key, member string, query *GeoRadiusQuery) *GeoLocationCmd
|
||||
GeoDist(key string, member1, member2, unit string) *FloatCmd
|
||||
@ -2055,12 +2055,12 @@ func (c *cmdable) GeoHash(key string, members ...string) *StringSliceCmd {
|
||||
return cmd
|
||||
}
|
||||
|
||||
func (c *cmdable) GeoPos(key string, names ...string) *GeoPosCmd {
|
||||
args := make([]interface{}, 2+len(names))
|
||||
func (c *cmdable) GeoPos(key string, members ...string) *GeoPosCmd {
|
||||
args := make([]interface{}, 2+len(members))
|
||||
args[0] = "geopos"
|
||||
args[1] = key
|
||||
for i, name := range names {
|
||||
args[2+i] = name
|
||||
for i, member := range members {
|
||||
args[2+i] = member
|
||||
}
|
||||
cmd := NewGeoPosCmd(args...)
|
||||
c.process(cmd)
|
||||
|
Reference in New Issue
Block a user