mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-11 18:30:24 +08:00
生成IP库的时候自动指定省略的城市名
This commit is contained in:
@@ -70,6 +70,11 @@ func (this *Template) Extract(text string, emptyValues []string) (values map[str
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 自动修复省略的城市名
|
||||||
|
if len(values["city"]) == 0 && len(values["province"]) > 0 && len(values["town"]) > 0 {
|
||||||
|
values["city"] = values["province"]
|
||||||
|
}
|
||||||
|
|
||||||
ok = true
|
ok = true
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user