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
+27.5k Golang : Convert integer to binary, octal, hexadecimal and back to integer
+6.3k WARNING: UNPROTECTED PRIVATE KEY FILE! error message
+17.5k Golang : Linked list example
+62.7k Golang : Convert HTTP Response body to string
+6.8k Swift : substringWithRange() function example
+31.6k Golang : Get local IP and MAC address
+30.4k Golang : How to verify uploaded file is image or allowed file types
+7.9k Swift : Convert (cast) String to Float
+28.8k Golang : Detect (OS) Operating System
+7.1k Golang : A simple forex opportunities scanner
+10.6k Golang : Resolve domain name to IP4 and IP6 addresses.
+7.9k Golang : Get today's weekday name and calculate target day distance example