修复IP查询结果显示时可能不显示县级单位的问题

This commit is contained in:
GoEdgeLab
2023-03-29 20:06:15 +08:00
parent 62fa08ed58
commit 04b7710abe

View File

@@ -177,7 +177,7 @@ func (this *QueryResult) Summary() string {
pieces = append(pieces, cityName)
}
if len(townName) > 0 && !lists.ContainsString(pieces, townName) && !lists.ContainsString(pieces, strings.TrimSuffix(townName, "县")) {
pieces = append(pieces, cityName)
pieces = append(pieces, townName)
}
if len(providerName) > 0 && !lists.ContainsString(pieces, providerName) {