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
+4.9k JQuery : Calling a function inside Jquery(document) block
+8k Findstr command the Grep equivalent for Windows
+16.5k Golang : File path independent of Operating System
+29.5k Golang : Login(Authenticate) with Facebook example
+14.6k Golang : Convert(cast) int to float example
+5.7k Unix/Linux/MacOSx : Get local IP address
+36k Golang : Get file last modified date and time
+30.9k error: trying to remove "yum", which is protected
+10.6k Golang : Flip coin example
+12.3k Golang : How to check if a string starts or ends with certain characters or words?
+17.5k Golang : Clone with pointer and modify value
+11.7k Golang : Secure file deletion with wipe example