From bd29077241a6da5222a555bc566ac51fedd68222 Mon Sep 17 00:00:00 2001 From: Nykolas Laurentino de Lima Date: Thu, 27 Apr 2017 14:24:25 -0300 Subject: [PATCH] Remove unnecessary code Remove unnecessary if and return the value directly --- command.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/command.go b/command.go index 543aeac1..33c11aaf 100644 --- a/command.go +++ b/command.go @@ -111,10 +111,7 @@ type baseCmd struct { } func (cmd *baseCmd) Err() error { - if cmd.err != nil { - return cmd.err - } - return nil + return cmd.err } func (cmd *baseCmd) args() []interface{} {