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: inconsistent documentation for Listen addrs. #9351

bcmills opened this issue Dec 16, 2014 · 2 comments

net: inconsistent documentation for Listen addrs. #9351

bcmills opened this issue Dec 16, 2014 · 2 comments


Copy link

@bcmills bcmills commented Dec 16, 2014


The example in the Overview section says:

The Listen function creates servers:
ln, err := net.Listen("tcp", ":8080")

The comment for Listen says:

See Dial for the syntax of laddr.

The comment for Dial says:

For TCP and UDP networks, addresses have the form host:port.

This contradicts the example in the Overview section, which elides the host. Assuming the Overview example is correct, the comment for Dial comment should be updated to describe what happens if the host and/or port is omitted.

@mikioh mikioh added this to the Go1.5 milestone Jan 21, 2015
Copy link

@mikioh mikioh commented Jun 12, 2015

Will fix this issue for Go 1.6, after deduplication of API surface code.

@mikioh mikioh modified the milestones: Go1.6, Go1.5 Jun 12, 2015
@rsc rsc changed the title net: Inconsistent documentation for Listen addrs. net: inconsistent documentation for Listen addrs. Nov 5, 2015
Copy link

@rsc rsc commented Jan 8, 2016

Fixed by ebf1f0f but I forgot to put the magic words in the CL description.

@rsc rsc closed this Jan 8, 2016
@golang golang locked and limited conversation to collaborators Jan 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.