Merge pull request #23609 from karalabe/regex-fix

internal/debug: make gosimple linter happy
pull/23610/head
Péter Szilágyi 3 years ago committed by GitHub
commit 86f3625455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      internal/debug/api.go

@ -207,7 +207,7 @@ func (*HandlerT) Stacks(filter *string) string {
// interpreter: // interpreter:
// //
// E.g. (eth || snap) && !p2p -> (eth in Value || snap in Value) && p2p not in Value // E.g. (eth || snap) && !p2p -> (eth in Value || snap in Value) && p2p not in Value
expanded = regexp.MustCompile("[:/\\.A-Za-z0-9_-]+").ReplaceAllString(expanded, "`$0` in Value") expanded = regexp.MustCompile(`[:/\.A-Za-z0-9_-]+`).ReplaceAllString(expanded, "`$0` in Value")
expanded = regexp.MustCompile("!(`[:/\\.A-Za-z0-9_-]+`)").ReplaceAllString(expanded, "$1 not") expanded = regexp.MustCompile("!(`[:/\\.A-Za-z0-9_-]+`)").ReplaceAllString(expanded, "$1 not")
expanded = strings.Replace(expanded, "||", "or", -1) expanded = strings.Replace(expanded, "||", "or", -1)
expanded = strings.Replace(expanded, "&&", "and", -1) expanded = strings.Replace(expanded, "&&", "and", -1)

Loading…
Cancel
Save