proxy: fix regex formatting error

This commit is contained in:
Lan Tian
2020-10-30 23:33:56 +08:00
parent 3bcfc3d36c
commit c15942cc32

View File

@@ -68,7 +68,7 @@ func tracerouteHandler(httpW http.ResponseWriter, httpR *http.Request) {
}
if result != nil {
errString = string(result)
errString = regexp.MustCompile(`\s*(\d*)\s*\*\n`).ReplaceAllStringFunc(errString, func(w string) string {
errString = regexp.MustCompile(`(?m)^\s*(\d*)\s*\*\n`).ReplaceAllStringFunc(errString, func(w string) string {
skippedCounter++
return ""
})