1
0
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:
Vladimir Mihailenco
2016-08-22 09:39:22 +00:00
parent 5e72ba7620
commit 235dc49d5f
3 changed files with 45 additions and 47 deletions

View File

@ -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)