fix country name is none

This commit is contained in:
zu1k
2020-08-16 12:45:51 +08:00
parent 7b74ed4419
commit 36d199a200

View File

@@ -68,7 +68,7 @@ func CrawlGo() {
num := len(proxies)
for i := 0; i < num; i++ {
country, err := GeoIp.Find(proxies[i].BaseInfo().Server)
if err != nil {
if err != nil || country == "" {
country = "Earth"
}
proxies[i].SetName(fmt.Sprintf("%s_%d_%s", ProjectName, i+1, country))