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
cmd/policy: Close file descriptor if required #23945
Conversation
close file fd Signed-off-by: jiuker <2818723467@qq.com>
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.
Two things: can you properly set the labels?
And, secondly, rather than doing a type assertion, I'd suggest something like this:
fp, err := os.Open(path)
if err != nil {
return nil, err
}
defer fp.Close()
r = fp
Signed-off-by: jiuker <2818723467@qq.com>
1.I don't have permission to modify pr's label |
/test |
My mistake; added. Tests seem to have failed for an unrelated reason; let's see if they go green. |
/test |
Conformance GatewayAPI failure is due to lack of rebase with master. Reviews are in, all CI jobs are good. Marking this ready to merge. |
Please ensure your pull request adheres to the following guidelines:
description and a
Fixes: #XXX
line if the commit addresses a particularGitHub issue.
Fixes: <commit-id>
tag, thenplease add the commit author[s] as reviewer[s] to this issue.
close file fd
Fixes: None