Compare commits

..

No commits in common. "ccbae8531d2e937199d3dadf93adeded6b062533" and "5303137428aecd411b107880ccd2cc33cb87f152" have entirely different histories.

View File

@ -8,7 +8,6 @@ import (
"golang.org/x/text/transform"
"io/ioutil"
"net"
"strings"
"sync"
)
@ -139,16 +138,8 @@ func QueryIP(queryIp string) (city string, area string, err error) {
}
}
}
if city != "" {
city = strings.TrimSpace(gb18030Decode([]byte(city)))
}
if area != "" {
if strings.Contains(area, "CZ88.NET") {
area = ""
} else {
area = strings.TrimSpace(gb18030Decode([]byte(area)))
}
}
city = gb18030Decode([]byte(city))
area = gb18030Decode([]byte(area))
ipCache.Store(queryIp, cache{City: city, Area: area})
return
}