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

@@ -196,10 +196,9 @@ func (r *CreateSetterRunner) ExecuteCmd(w io.Writer, pkgPath string) error {
// return err if RecurseSubPackages is false
if !r.CreateSetter.RecurseSubPackages {
return err
} else {
// print error message and continue if RecurseSubPackages is true
fmt.Fprintf(w, "%s\n", err.Error())
}
// print error message and continue if RecurseSubPackages is true
fmt.Fprintf(w, "%s\n", err.Error())
} else {
fmt.Fprintf(w, "created setter %q\n", r.CreateSetter.Name)
}