-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add ParseFromIP convenience function #19
Conversation
Pull Request Test Coverage Report for Build 2383458277Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Thanks for the PR, looks good! Can you add in a couple test cases to e.g. something like the following Lines 84 to 98 in 1ac5d9e
|
This is similar to `ParseFromIPAddr`, but parses a `net.IP` instead of an `net.IPNet`. The mask size is 32 for IPv4, or 128 for IPv6.
Thanks for the quick review @aaronfuj, added some simple tests (similar to |
No problem, thanks for the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
This is similar to
ParseFromIPAddr
, but parses anet.IP
instead ofan
net.IPNet
. The mask size is 32 for IPv4, or 128 for IPv6.Just a small function that I thought might be worth upstreaming. Thank you all for this module!