Browse Source

Cleanup some strange code

master
Kirill Nikolaev 1 month ago
parent
commit
2fed74df10
1 changed files with 3 additions and 13 deletions
  1. +3
    -13
      analyze.go

+ 3
- 13
analyze.go View File

@@ -22,25 +22,15 @@ func StartTimer() {
<-s.Start()
}
func startsWithDollarSign(topic string) bool {
if topic[:1] == "$" {
return false
}
return true
return topic[:1] != "$"
}

func topicFilter(topic string) bool {
if strings.Count(topic, "/") > 50000 {
return false
}
return true
return strings.Count(topic, "/") <= 50000
}
func isMatched(pattern string, text string) bool {
matched, _ := regexp.Match(pattern, []byte(text))
if matched {
return true
} else {
return false
}
return matched
}
func Analyze(b *bytes.Reader, fromPeer string, toPeer string, isSecured bool) bool {
packet, err := Decode(V5, b)


Loading…
Cancel
Save