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
+7.3k Golang : Fixing Gorilla mux http.FileServer() 404 problem
+9.9k Golang : Turn string or text file into slice example
+9.5k Golang : Extract or copy items from map based on value
+10.6k Fix ERROR 1045 (28000): Access denied for user 'root'@'ip-address' (using password: YES)
+11.7k Golang : Secure file deletion with wipe example
+9.3k Golang : How to get ECDSA curve and parameters data?
+6.8k Unix/Linux : How to fix CentOS yum duplicate glibc or device-mapper-libs dependency error?
+14.5k Golang : Rename directory
+14.5k Golang : Find network of an IP address
+15k Golang : Search folders for file recursively with wildcard support
+4.4k Linux/MacOSX : Search and delete files by extension
+6.8k Get Facebook friends working in same company