Handle errors

This commit is contained in:
Mikhail Mazurskiy
2021-06-05 09:43:13 +10:00
parent 0305860078
commit a3ed120efb
25 changed files with 232 additions and 126 deletions

View File

@@ -104,9 +104,9 @@ func (r *AnnotateRunner) ExecuteCmd(w io.Writer, pkgPath string) error {
return err
}
// print error message and continue if there are multiple packages to annotate
fmt.Fprintf(w, "%s\n", err.Error())
_, _ = fmt.Fprintf(w, "%s\n", err.Error())
} else {
fmt.Fprint(w, "added annotations in the package\n")
_, _ = fmt.Fprint(w, "added annotations in the package\n")
}
return nil
}