Skip to content

Commit

Permalink
Merge pull request #99 from aquasecurity/Remove-ContinueWithError
Browse files Browse the repository at this point in the history
Remove ContinueWithError
  • Loading branch information
yoavrotems authored Jun 25, 2020
2 parents bd31a7d + 66d35ec commit d325339
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,6 @@ func ExitWithError(err error) {
os.Exit(1)
}

func continueWithError(err error, msg string) string {
if err != nil {
glog.V(1).Info(err)
}

if msg != "" {
fmt.Fprintf(os.Stderr, "%s\n", msg)
}

return ""
}

// CleanIDs cleans ids from provided list
func CleanIDs(list string) []string {
list = strings.Trim(list, ",")
Expand Down Expand Up @@ -184,7 +172,8 @@ func PrintOutput(output string, outputFile string) {
err := writeOutputToFile(output, outputFile)
if err != nil {
s := fmt.Sprintf("Failed to write to output file %s", outputFile)
continueWithError(err, sprintlnWarn(s))
glog.V(1).Info(err)
fmt.Fprintf(os.Stderr, "%s\n", s)
}
}
}

0 comments on commit d325339

Please sign in to comment.