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/url: inaccurate documentation for method URL.String #10227

Closed
bmatsuo opened this issue Mar 23, 2015 · 1 comment
Closed

net/url: inaccurate documentation for method URL.String #10227

bmatsuo opened this issue Mar 23, 2015 · 1 comment

Comments

@bmatsuo
Copy link

bmatsuo commented Mar 23, 2015

go version: 1.4.2

problem: The godoc for URL.String in "net/url" does not accurately describe the method's behavior when the Opaque field is set.

scheme:opaque
scheme://userinfo@host/path?query#fragment

If u.Opaque is non-empty, String uses the first form; otherwise it uses the second form.

The following playground link demonstrates a *url.URL which does not fall into these categories.

http://play.golang.org/p/SPGP5eSieA

The documentation states that the snippet should print "https://example.com/foo". But they observed string is "https://example.com/foo?bar=baz#qux"

@minux
Copy link
Member

minux commented Mar 24, 2015 via email

@minux minux closed this as completed in 1c26176 Mar 24, 2015
@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.
Projects
None yet
Development

No branches or pull requests

4 participants