Skip to content

compute: used net.IP.Equal vs bytes.Equal for IP comparison #12279

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

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

wyardley
Copy link
Contributor

@wyardley wyardley commented Nov 8, 2024

Resolves a lint warning and removes an extra import:
SA1021: use net.IP.Equal to compare net.IPs, not bytes.Equal

https://staticcheck.dev/docs/checks#SA1021 explains the reasoning a bit more.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.


Resolves lint warning:
SA1021: use net.IP.Equal to compare net.IPs, not bytes.Equal
@github-actions github-actions bot requested a review from hao-nan-li November 8, 2024 00:06
Copy link

github-actions bot commented Nov 8, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@hao-nan-li, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@modular-magician modular-magician added awaiting-approval Pull requests that need reviewer's approval to run presubmit tests service/compute-l7-load-balancer and removed awaiting-approval Pull requests that need reviewer's approval to run presubmit tests labels Nov 8, 2024
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 1 file changed, 1 insertion(+), 2 deletions(-))
google-beta provider: Diff ( 1 file changed, 1 insertion(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 1 insertion(+), 2 deletions(-))

@wyardley wyardley changed the title compute: use net.IP.Equal vs bytes.Equal for IP comparison compute: used net.IP.Equal vs bytes.Equal for IP comparison Nov 8, 2024
@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1060
Passed tests: 987
Skipped tests: 73
Affected tests: 0

Click here to see the affected service packages
  • compute

🟢 All tests passed!

View the build log

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.

3 participants