diff --git a/session/command_handler.go b/session/command_handler.go index 184d3168..a3c5a06d 100644 --- a/session/command_handler.go +++ b/session/command_handler.go @@ -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 } diff --git a/session/module_handler.go b/session/module_handler.go index 4a55aeb3..d7f7f89c 100644 --- a/session/module_handler.go +++ b/session/module_handler.go @@ -43,7 +43,7 @@ func (h *ModuleHandler) Parse(line string) (bool, []string) { } else { 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 }