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

net: Update comment on the `To4` function. #10349

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
3 participants
@yawboakye
Copy link

commented Apr 4, 2015

The current implementation of To4 returns nil only if the IP address
is invalid, i.e. has the wrong length.

Update comment on the `To4` function.
The current implementation of `To4` returns `nil` only if the IP address
is invalid, i.e. has the wrong length.
@minux

This comment has been minimized.

Copy link
Member

commented Apr 4, 2015

Sorry, we don't accept pull requests.

Please see https://golang.org/doc/contribute.html for the contribution guideline.

And btw, I don't think the change is an improvement.

@minux minux closed this Apr 4, 2015

@yawboakye

This comment has been minimized.

Copy link
Author

commented Apr 4, 2015

@minux I didn't know you didn't accept pull requests (via GitHub?). Also the change is not an improvement, yes. It doesn't reduce CPU cycles or the memory requirements of To4. But it corrects a misleading comment, a very wrong description of how the function behaves. If the comments are meant to explain the function then it's important to keep it correct. imo.

@minux

This comment has been minimized.

Copy link
Member

commented Apr 4, 2015

@mikioh mikioh changed the title Update comment on the `To4` function. net: Update comment on the `To4` function. Apr 5, 2015

@yawboakye

This comment has been minimized.

Copy link
Author

commented Apr 6, 2015

Got it. Thanks :)

@golang golang locked and limited conversation to collaborators Jun 25, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.