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
+21.2k Golang : How to force compile or remove object files first before rebuild?
+11.1k Golang : Roll the dice example
+4.9k Python : Find out the variable type and determine the type with simple test
+15k Golang : How do I get the local IP (non-loopback) address ?
+4.3k Javascript : How to show different content with noscript?
+14k Golang : convert rune to unicode hexadecimal value and back to rune character
+10.6k RPM : error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
+7.7k Golang : Mapping Iban to Dunging alphabets
+28.8k Golang : Detect (OS) Operating System
+30.6k Golang : Remove characters from string example
+6.1k Java : Human readable password generator
+23.9k Golang : Fix type interface{} has no field or no methods and type assertions example