feat(查询优化): 剔除无效区域

This commit is contained in:
xiaoqidun 2021-04-09 13:08:23 +08:00
parent 35d03559c6
commit 0865c44d5e

@ -141,6 +141,7 @@ func QueryIP(queryIp string) (city string, area string, err error) {
} }
city = strings.TrimSpace(gb18030Decode([]byte(city))) city = strings.TrimSpace(gb18030Decode([]byte(city)))
area = strings.TrimSpace(gb18030Decode([]byte(area))) area = strings.TrimSpace(gb18030Decode([]byte(area)))
area = strings.ReplaceAll(area, "CZ88.NET", "")
ipCache.Store(queryIp, cache{City: city, Area: area}) ipCache.Store(queryIp, cache{City: city, Area: area})
return return
} }