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: unused variable failure warning in webhooks file #916

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

amitamrutiya
Copy link
Contributor

@amitamrutiya amitamrutiya commented Feb 5, 2024

Closes #901

πŸ“‘ Description

In the files mutating_webhook.go and validating_webhook.go, there's a warning indicating that the variable failures is declared but never used. This suggests that in the current code structure, if an error occurs while creating services, we append the failure but continue the loop without storing it. Consequently, this failure is never recorded. In this pull request, I address this by storing this failure value before executing continue statements.

βœ… Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Also this pull request able to solve #917 issue.

Signed-off-by: amitamrutiya2210 <amitamrutiya2210@gmail.com>
@amitamrutiya amitamrutiya requested review from a team as code owners February 5, 2024 09:48
@amitamrutiya amitamrutiya mentioned this pull request Feb 7, 2024
4 tasks
@AlexsJones AlexsJones merged commit 3f0964a into k8sgpt-ai:main Feb 13, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Bug]: Unused variable warning in mutating_webhook.go
2 participants