mirror of
https://github.com/SagerNet/sing-geosite.git
synced 2025-12-16 14:23:16 +08:00
Update cn usage
This commit is contained in:
7
main.go
7
main.go
@@ -262,7 +262,7 @@ func mergeTags(data map[string][]geosite.Item) {
|
||||
cnCodeList = append(cnCodeList, code)
|
||||
}
|
||||
newMap := make(map[geosite.Item]bool)
|
||||
for _, item := range data["cn"] {
|
||||
for _, item := range data["geolocation-cn"] {
|
||||
newMap[item] = true
|
||||
}
|
||||
for _, code := range cnCodeList {
|
||||
@@ -274,7 +274,7 @@ func mergeTags(data map[string][]geosite.Item) {
|
||||
for item := range newMap {
|
||||
newList = append(newList, item)
|
||||
}
|
||||
data["cn"] = newList
|
||||
data["geolocation-cn"] = newList
|
||||
println("merged cn categories: " + strings.Join(cnCodeList, ","))
|
||||
}
|
||||
|
||||
@@ -301,8 +301,7 @@ func generate(release *github.RepositoryRelease, output string, cnOutput string,
|
||||
return err
|
||||
}
|
||||
cnCodes := []string{
|
||||
"cn",
|
||||
"geolocation-!cn",
|
||||
"geolocation-cn",
|
||||
}
|
||||
cnDomainMap := make(map[string][]geosite.Item)
|
||||
for _, cnCode := range cnCodes {
|
||||
|
||||
Reference in New Issue
Block a user