misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-11 20:09:06 +01:00
parent 7f7e5a24f8
commit c838abbe25
3 changed files with 8 additions and 34 deletions

View file

@ -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
}