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

remove dead code #508

Merged
merged 2 commits into from
Mar 4, 2024
Merged

remove dead code #508

merged 2 commits into from
Mar 4, 2024

Conversation

ulrichSchreiner
Copy link
Contributor

remove dead code.

in the image-service the result of ListMachines is only used later when doing the lookup via machinesByImage. But after this lookup we have a nested if-construct where the inner "if" is always false as it was checked a few lines above. so the if len(machiens) ... is alway an empty block and can be removed. so the whole Listmachines .

same in network-service as the if err != nil is always false.

@ulrichSchreiner ulrichSchreiner requested a review from a team as a code owner February 28, 2024 10:13
@ulrichSchreiner ulrichSchreiner self-assigned this Feb 28, 2024
@Gerrit91
Copy link
Contributor

Great that you found this. Can't we just remove the inner if-clauses that check the error to make the code behave as it was intended?

@ulrichSchreiner
Copy link
Contributor Author

ok, code changed so it behaves like the author originally wanted

@majst01 majst01 merged commit 405ad42 into master Mar 4, 2024
2 checks passed
@majst01 majst01 deleted the remove-dead-code branch March 4, 2024 07:43
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