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: API #2946

Closed
rsc opened this issue Feb 9, 2012 · 4 comments
Closed

net/url: API #2946

rsc opened this issue Feb 9, 2012 · 4 comments
Milestone

Comments

@rsc
Copy link
Contributor

rsc commented Feb 9, 2012

Receivers are all different names.
Should pick one (probably u).

ParseWithReference should be ParseFragment, both to match
the name of the extra field that it fills in and to avoid confusion
with the other meaning of "reference" used elsewhere in the API.

ParseRequest should be ParseRequestURI to match the URL type's
RequestURI method.
@dsymonds
Copy link
Contributor

Comment 1:

Owner changed to @dsymonds.

Status changed to Started.

@dsymonds
Copy link
Contributor

Comment 2:

Receiver names were regularised in
https://code.google.com/p/go/source/detail?r=1a03fdfef2ab48cc714aa8a74c42dae508b659a1.
ParseWithReference was renamed to ParseWithFragment in
https://code.google.com/p/go/source/detail?r=27d981f51226bc90021c4c3f33f170e4cf04137e.
Open for discussion is what to do with ParseRequest. Russ suggests ParseRequestURI so
match the RequestURI, but the semantics of the two don't exactly match. The function
takes an absolute URI or absolute path; the method is only documented to produce a path
(plus query).

@rsc
Copy link
Contributor Author

rsc commented Feb 16, 2012

Comment 3:

I think you are falling down the Java rathole, trying to make names
into some kind of standalone essays that need no documentation.
ParseFragment is fine, as is ParseRequestURI.  A RequestURI is exactly
what is being parsed.

@rsc
Copy link
Contributor Author

rsc commented Feb 17, 2012

Comment 4:

This issue was closed by revision b27bd42.

Status changed to Fixed.

@rsc rsc added fixed labels Feb 17, 2012
@rsc rsc added this to the Go1 milestone Apr 10, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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

3 participants