Redis geo.lua example using Go
1 min readMay 24, 2018
I stumbled upon geo.lua which seemed to be an interesting library. It’s described as
“… a Lua library containing miscellaneous geospatial helper routines for use with Redis“
Here is an example of using it with the Go Redis client (go-redis). This is what it does in a nutshell
- adds (
GEOADD
) co-ordinates to a Redis Geo set geo.lua
is invoked using EVAL- executes
GEOPATHLEN
(a variadic form ofGEODIST
)
To run, refer README — its super simple
Cheers!
Originally published at simplydistributed.wordpress.com on May 24, 2018.