Encode / decode URLs

What’s the recommended way of encoding and decoding entire URLs in Go? I am aware of the methods url.QueryEscape and url.QueryUnescape , but they don’t seem to be exactly what I am looking for. Specifically I am looking for methods like JavaScript’s encodeURIComponent and decodeURIComponent .

Thanks.