9951 explained code solutions for 126 technologies

golangHow to URL encode value

package main
import "net/url"

func main() {
  escaped := url.QueryEscape("name is Joe & Donald")
}ctrl + c
package main

default package declaration

func main() {

declare main function that will be launched automatically


encodes given value based on URL encoding standard

name is Joe & Donald

sample value to encode