-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add error handling #332
add error handling #332
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending P/R.
I commented on it. I am waiting for fix.
commands/report.go
Outdated
@@ -357,6 +357,10 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{} | |||
|
|||
history, err := loadOneScanHistory(jsonDir) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this blank line.
commands/report.go
Outdated
@@ -357,6 +357,10 @@ func (p *ReportCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{} | |||
|
|||
history, err := loadOneScanHistory(jsonDir) | |||
|
|||
if err != nil { | |||
Log.Error(err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix as below.
if err != nil {
util.Log.Error(err)
return subcommands.ExitFailure
}
I will merge this P/R. |
I fixed it according to the review
Many Thanks!! |
Because error handling was missing