shared/util.go
func URLEncode(path string, query map[string]string) (string, error) {
	u, err := url.Parse(path)
	if err != nil {
		return "", err
	}

	params := url.Values{}
	for key, value := range query {
		params.Add(key, value)
	}
	u.RawQuery = params.Encode()
	return u.String(), nil
}
func URLEncode(path string, query map[string]string) (string, error) {
	u, err := url.Parse(path)
	if err != nil {
		return "", err
	}

	params := url.Values{}
	for key, value := range query {
		params.Add(key, value)
	}
	u.RawQuery = params.Encode()
	return u.String(), nil
}
func URLEncode ( path string , query map [ string ] string ) ( string , error ) { u , err := url . Parse ( path ) if err != nil { return " " , err } params := url . Values { } for key , value := range query { params . Add ( key , value ) } u . RawQuery = params . Encode ( ) return u . String ( ) , nil }
// URLEncode encodes a path and query parameters to a URL.
URLEncode encodes a path and query parameters to a URL .