Mapping IP to Country use go-redis/redis/v8
- sign up : https://www.maxmind.com/en/home
- guide : https://blog.csdn.net/qq_26373925/article/details/111876765
Path : config/config.go
// config for redis
var (
// Addr = "redis-ipcountry-redis:6379" // for docker
Addr = "127.0.0.1:6379" // for localhost
Password = ""
DB = 1
)
// file path for ip to country
const FilePath = "../asset/GeoLite2-City-CSV/"
docker-compose up -d
docker-compose down