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

Simplify getLocalAddr by removing unnecessary IP to string conversion #81

Merged
merged 1 commit into from
Feb 18, 2025

Conversation

vbanos
Copy link
Contributor

@vbanos vbanos commented Feb 18, 2025

We converted the net.IP to string, pass it to getLocalAddr function and then convert it back to IP.

We already have it as net.IP, there is no need to do that.

Also, it isn't possible to have an IP with an invalid format so some unit tests are no longer needed.

We converted the `net.IP` to string, pass it to `getLocalAddr` function and
then convert it back to IP.

We already have it as `net.IP`, there is no need to do that.

Also, it isn't possible to have an IP with an invalid format so some
unit tests are no longer needed.
@CorentinB
Copy link
Owner

LGTM! Thanks

@CorentinB CorentinB merged commit a23a682 into CorentinB:master Feb 18, 2025
1 check passed
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.

2 participants