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: Export function escape(s string, mode encoding) string and the encoding constants #13982

Closed
jiridanek opened this issue Jan 16, 2016 · 2 comments

Comments

@jiridanek
Copy link
Contributor

I am proposing to make the function

func escape(s string, mode encoding) string

in https://golang.org/src/net/url/url.go exported, so that the library provides full interface to percent encoding. This has been first suggested in issue #4013.

@bradfitz
Copy link
Contributor

I don't think that's a good idea.

The net/url package is full of non-spec compliant hacks for compatibility with our past mistakes. It's not something that should be exported.

@kelwang
Copy link

kelwang commented Apr 6, 2016

seems a lot of api signature use %20 for space encoding
and has to do something like strings.Replace(orignal_encoding, "+", "%20", -1)

@golang golang locked and limited conversation to collaborators Apr 6, 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

4 participants