-
Notifications
You must be signed in to change notification settings - Fork 360
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
fix: ci lint for mod registry and image #1
fix: ci lint for mod registry and image #1
Conversation
update from upstream
should not ignore errors! @justadogistaken |
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.
handle errors
} | ||
err = os.Remove(file.Name()) | ||
if err != nil { | ||
logger.Warn(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.
The recommended way is to return the error, caller decision write log or not
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.
I suppose os.Remove/Close ... won't return err regularly. So if error occurs, we log it.
do golangci-lint on registry&image module, and fixed issues occurred