fix: simplified code

This commit is contained in:
evilsocket 2018-01-08 08:28:03 +01:00
parent b3ccec269a
commit 181e112e14
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ func NewCommandHandler(name string, expr string, desc string, exec func(args []s
func (h *CommandHandler) Parse(line string) (bool, []string) {
result := h.Parser.FindStringSubmatch(line)
if len(result) == h.Parser.NumSubexp()+1 {
return true, result[1:len(result)]
return true, result[1:]
} else {
return false, nil
}