From 1c43d25e3519cc70fc238d669f7b2aa826ac716a Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Thu, 24 Aug 2017 11:08:51 -0700 Subject: Avoid unnecessary if statement --- command.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/command.go b/command.go index de501d5..9614269 100644 --- a/command.go +++ b/command.go @@ -73,11 +73,9 @@ func (c *Command) predict(a Args) (options []string, only bool) { if only { return } - } - // We matched so stop searching. Continuing to search can accidentally - // match a subcommand with current set of commands, see issue #46. - if subCommandFound { + // We matched so stop searching. Continuing to search can accidentally + // match a subcommand with current set of commands, see issue #46. break } } -- cgit v1.2.3