mirror of
https://github.com/nitezs/sub2clash.git
synced 2024-12-23 20:24:42 -05:00
fix: 修复重名节点没有正确重命名的问题
This commit is contained in:
parent
70f5c63fe2
commit
d8a81e44b6
@ -173,9 +173,11 @@ func BuildSub(clashType model.ClashType, query validator.SubValidator, template
|
||||
names := make(map[string]int)
|
||||
for i := range proxyList {
|
||||
if _, exist := names[proxyList[i].Name]; exist {
|
||||
names[proxyList[i].Name] = names[proxyList[i].Name] + 1
|
||||
proxyList[i].Name = proxyList[i].Name + " " + strconv.Itoa(names[proxyList[i].Name])
|
||||
} else {
|
||||
names[proxyList[i].Name] = 0
|
||||
}
|
||||
names[proxyList[i].Name] = names[proxyList[i].Name] + 1
|
||||
}
|
||||
// trim
|
||||
for i := range proxyList {
|
||||
|
Loading…
Reference in New Issue
Block a user