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: replace raw loops with funcs from slices and maps #1784

Merged
merged 1 commit into from
Jan 5, 2024
Merged

Refactor: replace raw loops with funcs from slices and maps #1784

merged 1 commit into from
Jan 5, 2024

Conversation

alexandear
Copy link
Contributor

@alexandear alexandear commented Jan 4, 2024

This PR replaces raw loops with functions from slices and maps packages. By doing this, we are simplifying our code base, enhancing readability, and improving maintainability.

Also, deprecate unneeded function util.StringInSlice that can be replaced with slices.Contains.

When we upgrade to Go 1.21, golang.org/x/exp/slices will be replaced by slices from std.

Copy link
Member

@rhatdan rhatdan left a comment

Choose a reason for hiding this comment

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

Thanks Nice work, one Nit
LGTM
@Luap99 @vrothberg @mheon @ashley-cui PTAL

@mheon
Copy link
Member

mheon commented Jan 4, 2024

Sure, LGTM modulo Dan's comment.

Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
@rhatdan
Copy link
Member

rhatdan commented Jan 4, 2024

/hold
/lgtm
/approve
Thanks @alexandear

Copy link
Contributor

openshift-ci bot commented Jan 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alexandear, rhatdan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved label Jan 4, 2024
@mheon
Copy link
Member

mheon commented Jan 5, 2024

/hold cancel

@openshift-merge-bot openshift-merge-bot bot merged commit 8a44f84 into containers:main Jan 5, 2024
6 checks passed
Copy link
Member

@vrothberg vrothberg left a comment

Choose a reason for hiding this comment

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

Late LGTM, thanks!

@alexandear alexandear deleted the refactor-raw-loops-slices-maps branch January 5, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants