Golang text/template.URLQueryEscaper() function example
package text/template
Golang text/template.URLQueryEscaper() function usage example
package main
import (
"fmt"
"text/template"
)
func main() {
search := "Zip Unzip"
finalURL := "http://go-search.org/search?q=" + template.URLQueryEscaper(search)
fmt.Println(finalURL)
}
Output :
http://go-search.org/search?q=Zip+Unzip
Reference :
Advertisement
Something interesting
Tutorials
+6.1k Golang : Scan forex opportunities by Bollinger bands
+13.6k Golang : reCAPTCHA example
+25.4k Golang : Generate MD5 checksum of a file
+6.8k Golang : Get expvar(export variables) to work with multiplexer
+11.5k CodeIgniter : Import Linkedin data
+22.4k Golang : How to read JPG(JPEG), GIF and PNG files ?
+6k Javascript : Get operating system and browser information
+29.5k Golang : Saving(serializing) and reading file with GOB
+7.2k Ubuntu : connect() to unix:/var/run/php5-fpm.sock failed (13: Permission denied) while connecting to upstream
+13.2k Golang : Convert(cast) int to int64
+9k Golang : automatically figure out array length(size) with three dots
+4.7k MariaDB/MySQL : Form select statement or search query with Chinese characters