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

Closed
bcmills opened this issue Dec 16, 2014 · 2 comments
Closed

net: inconsistent documentation for Listen addrs. #9351

bcmills opened this issue Dec 16, 2014 · 2 comments

Comments

@bcmills
Copy link
Contributor

bcmills commented Dec 16, 2014

See http://golang.org/pkg/net/.

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
@mikioh
Copy link
Contributor

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
@rsc
Copy link
Contributor

rsc commented Jan 8, 2016

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

@rsc rsc closed this as completed 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.
Projects
None yet
Development

No branches or pull requests

5 participants