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?
to your account
why not return dst.String() directly
The text was updated successfully, but these errors were encountered:
Most likely because you don't know if dst has a slash as a prefix?
The code doesn't seem terribly efficient in the case where the slash already exists, but I don't know if that actually matters.
It's for historical reasons. See https://golang.org/cl/264817.
But we can clean it up. Sent https://golang.org/cl/282673.
Change https://golang.org/cl/282673 mentions this issue: net/url: avoid string concatenation in resolvePath
net/url: avoid string concatenation in resolvePath
Successfully merging a pull request may close this issue.