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 golangci linter issues #976

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Conversation

dcantah
Copy link
Contributor

@dcantah dcantah commented Mar 17, 2021

  • Remove unused mutex for the grpc service in ncproxy
  • Remove unnecessary os.Stat call that didn't even check the return value
    facepalm

Signed-off-by: Daniel Canter [email protected]

* Remove unused mutex for the grpc service in ncproxy
* Remove unneccessary os.Stat call that didn't even check the return value
*facepalm*

Signed-off-by: Daniel Canter <[email protected]>
@dcantah dcantah requested a review from a team as a code owner March 17, 2021 22:39
@dcantah
Copy link
Contributor Author

dcantah commented Mar 17, 2021

This is one of a few PRs to get golangci happy with our repo before we swap over. #975

if os.Stat(diffVhdPath); err == nil {
os.RemoveAll(diffVhdPath)
}
os.RemoveAll(diffVhdPath)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of removing the Stat call, should we be checking the return value?

Copy link
Contributor Author

@dcantah dcantah Mar 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't really even see a need for the stat call. If the file doesn't exist RemoveAll will just silently succeed anyways.

Copy link
Contributor

@katiewasnothere katiewasnothere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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