31

Possible Duplicate:
Encode / decode URLs

What's the recommended way to encode/decode URLs in Go? I am looking to the equivalent of encodeURIComponent in JavaScript.

Community
  • 1
  • 1
Sergi Mansilla
  • 12,495
  • 10
  • 39
  • 48
  • here we are: https://github.com/alessiosavi/GoCloudant/blob/a8ad3a7990f04ea728bb327d6faea6af3e5455ca/cloudant.go#L116 – alessiosavi Sep 25 '19 at 19:15

1 Answers1

31

You're looking for the "net/url" package.

http://golang.org/pkg/net/url/#QueryEscape

Daniel
  • 38,041
  • 11
  • 92
  • 73