mirror of
https://github.com/bettercap/bettercap
synced 2025-07-07 13:32:07 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
7f7e5a24f8
commit
c838abbe25
3 changed files with 8 additions and 34 deletions
|
@ -40,15 +40,12 @@ func (h *ModuleHandler) Parse(line string) (bool, []string) {
|
|||
if h.Parser == nil {
|
||||
if line == h.Name {
|
||||
return true, nil
|
||||
} else {
|
||||
return false, nil
|
||||
}
|
||||
} else {
|
||||
result := h.Parser.FindStringSubmatch(line)
|
||||
if len(result) == h.Parser.NumSubexp()+1 {
|
||||
return true, result[1:]
|
||||
} else {
|
||||
return false, nil
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
result := h.Parser.FindStringSubmatch(line)
|
||||
if len(result) == h.Parser.NumSubexp()+1 {
|
||||
return true, result[1:]
|
||||
}
|
||||
return false, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue