Skip to content
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

Merged

Conversation

justadogistaken
Copy link
Member

do golangci-lint on registry&image module, and fixed issues occurred

@CLAassistant
Copy link

CLAassistant commented Apr 30, 2021

CLA assistant check
All committers have signed the CLA.

image/default_image.go Outdated Show resolved Hide resolved
@fanux
Copy link
Collaborator

fanux commented Apr 30, 2021

should not ignore errors! @justadogistaken

Copy link
Collaborator

@fanux fanux left a 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)
Copy link
Collaborator

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

Copy link
Member Author

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.

image/util.go Outdated Show resolved Hide resolved
@justadogistaken justadogistaken merged commit 889baa6 into sealerio:main May 1, 2021
@Jekbon Jekbon mentioned this pull request Jul 13, 2022
@sfeng1996 sfeng1996 mentioned this pull request Jul 15, 2022
@justadogistaken justadogistaken deleted the fix/mod-registry-image-lint branch September 26, 2022 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants