diff --git a/.back/create_public_branch.py b/.back/create_public_branch.py index c66de814..cf2678ab 100755 --- a/.back/create_public_branch.py +++ b/.back/create_public_branch.py @@ -44,16 +44,10 @@ def modify_speed_go(filepath): ) content = re.sub( - r''' - \n\s*// 对于三网测速(cmcc、cu、ct),优先使用 privatespeedtest 进行私有测速 - \s*\n - \s*opLower\s*:=\s*strings\.ToLower\(operator\) - [\s\S]*? - \n\s*}\s* - ''', + r'^[ \t]*// 对于三网测速(cmcc、cu、ct),优先使用 privatespeedtest 进行私有测速[\s\S]*?\n\s*\n', '\n', content, - flags=re.MULTILINE | re.VERBOSE + flags=re.MULTILINE ) write_file(filepath, content) diff --git a/internal/tests/speed.go b/internal/tests/speed.go index e9bf59b1..f0570cbf 100644 --- a/internal/tests/speed.go +++ b/internal/tests/speed.go @@ -189,6 +189,7 @@ func CustomSP(platform, operator string, num int, language string) { return } } + var url, parseType string if strings.ToLower(platform) == "cn" { if strings.ToLower(operator) == "cmcc" {