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

Refactor limayaml.FirstUsernetIndex implementation and usages #2357

Merged

Conversation

alexandear
Copy link
Member

@alexandear alexandear commented May 23, 2024

The PR refactors limayaml.FirstUsernetIndex implementation and it's usage:

  • Rename networks.Usernet to networks.IsUsernet.
  • Use slices.IndexFunc instead of raw for loop.
  • Invert if-else conditions in the startUsernet function to decrease indentation and for consistency with other limayaml.FirstUsernetIndex usages.

@alexandear alexandear force-pushed the refactor/pkg-first-usernet-index branch 5 times, most recently from 4e003a1 to fbcb6e3 Compare May 23, 2024 13:04
jandubois
jandubois previously approved these changes May 24, 2024
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

pkg/limayaml/defaults.go Outdated Show resolved Hide resolved
jandubois
jandubois previously approved these changes May 24, 2024
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks, LGTM

Just some minor nit-picking about comments

pkg/networks/config.go Outdated Show resolved Hide resolved
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
Copy link
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

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

Thanks

@jandubois jandubois added this to the v0.23.0 (tentative) milestone May 24, 2024
@jandubois jandubois merged commit ed727dc into lima-vm:master May 24, 2024
27 checks passed
@alexandear alexandear deleted the refactor/pkg-first-usernet-index branch May 24, 2024 20:40
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.

None yet

2 participants