Fix golint warning

golint warning: if block ends with a return statement, so drop this else and outdent its block

Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
This commit is contained in:
Ma Xinjian
2021-04-28 14:45:31 +08:00
parent 7716b1bd3d
commit 677ec868e0
11 changed files with 22 additions and 33 deletions

View File

@@ -81,10 +81,9 @@ func (r *CountRunner) ExecuteCmd(w io.Writer, pkgPath string) error {
// return err if there is only package
if !r.RecurseSubPackages {
return err
} else {
// print error message and continue if there are multiple packages to annotate
fmt.Fprintf(w, "%s\n", err.Error())
}
// print error message and continue if there are multiple packages to annotate
fmt.Fprintf(w, "%s\n", err.Error())
}
return nil
}